Consistent spelling of "writeable"

Fixes #4425
This commit is contained in:
Norman Feske 2022-02-11 15:11:03 +01:00
parent 0d48b74bec
commit 33b038e8a7
28 changed files with 70 additions and 70 deletions

View File

@ -176,7 +176,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc,
using namespace Foc;
uint8_t flags = L4_FPAGE_RO;
if (dsc.writable() && attribute.writeable)
if (dsc.writeable() && attribute.writeable)
if (attribute.executable)
flags = L4_FPAGE_RWX;
else

View File

@ -67,7 +67,7 @@ Core_region_map::attach(Dataspace_capability ds_cap, size_t size,
/* map the dataspace's physical pages to corresponding virtual addresses */
unsigned num_pages = (unsigned)(page_rounded_size >> get_page_size_log2());
Page_flags const flags { (writeable && ds.writable()) ? RW : RO,
Page_flags const flags { (writeable && ds.writeable()) ? RW : RO,
NO_EXEC, KERN, GLOBAL,
ds.io_mem() ? DEVICE : RAM,
ds.cacheability() };

View File

@ -47,7 +47,7 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
size_t const _size; /* size of dataspace in bytes */
addr_t const _addr; /* meaningless on linux */
Native_capability _cap; /* capability / file descriptor */
bool const _writable; /* false if read-only */
bool const _writeable; /* false if read-only */
/*
* Holds the dataspace owner if a distinction between owner and
@ -74,10 +74,10 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
/**
* Constructor
*/
Dataspace_component(size_t size, addr_t addr, Cache, bool writable,
Dataspace_component(size_t size, addr_t addr, Cache, bool writeable,
Dataspace_owner * owner)
:
_size(size), _addr(addr), _cap(), _writable(writable), _owner(owner)
_size(size), _addr(addr), _cap(), _writeable(writeable), _owner(owner)
{ }
/**
@ -85,7 +85,7 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
*/
Dataspace_component()
:
_size(0), _addr(0), _cap(), _writable(false), _owner(nullptr)
_size(0), _addr(0), _cap(), _writeable(false), _owner(nullptr)
{ }
/**
@ -93,7 +93,7 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
* reasons and should not be used.
*/
Dataspace_component(size_t size, addr_t, addr_t phys_addr,
Cache, bool writable, Dataspace_owner *_owner);
Cache, bool writeable, Dataspace_owner *_owner);
/**
* This constructor is especially used for ROM dataspaces
@ -127,8 +127,8 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
** Dataspace interface **
*************************/
size_t size() override { return _size; }
bool writable() override { return _writable; }
size_t size() override { return _size; }
bool writeable() override { return _writeable; }
/****************************************

View File

@ -187,8 +187,8 @@ int Region_map_mmap::_dataspace_fd(Capability<Dataspace> ds_cap)
}
bool Region_map_mmap::_dataspace_writable(Dataspace_capability ds_cap)
bool Region_map_mmap::_dataspace_writeable(Dataspace_capability ds_cap)
{
return core_env().entrypoint().apply(ds_cap, [] (Dataspace *ds) {
return ds ? ds->writable() : false; });
return ds ? ds->writeable() : false; });
}

View File

@ -68,7 +68,7 @@ Dataspace_component::Dataspace_component(const char *args)
_size(_file_size()),
_addr(0),
_cap(_fd_to_cap(lx_open(_fname.buf, O_RDONLY | LX_O_CLOEXEC, S_IRUSR | S_IXUSR))),
_writable(false),
_writeable(false),
_owner(0)
{ }
@ -76,7 +76,7 @@ Dataspace_component::Dataspace_component(const char *args)
Dataspace_component::Dataspace_component(size_t size, addr_t, addr_t phys_addr,
Cache, bool, Dataspace_owner *_owner)
:
_size(size), _addr(phys_addr), _cap(), _writable(false), _owner(_owner)
_size(size), _addr(phys_addr), _cap(), _writeable(false), _owner(_owner)
{
warning("Should only be used for IOMEM and not within Linux.");
_fname.buf[0] = 0;

View File

@ -67,15 +67,15 @@ Dataspace_component::Dataspace_component(const char *args)
_size(_file_size()),
_addr(0),
_cap(_fd_to_cap(lx_open(_fname.buf, O_RDONLY | LX_O_CLOEXEC, S_IRUSR | S_IXUSR))),
_writable(false),
_writeable(false),
_owner(0)
{ }
Dataspace_component::Dataspace_component(size_t size, addr_t, addr_t phys_addr,
Cache, bool writable, Dataspace_owner *_owner)
Cache, bool writeable, Dataspace_owner *_owner)
:
_size(size), _addr(phys_addr), _cap(), _writable(writable), _owner(_owner)
_size(size), _addr(phys_addr), _cap(), _writeable(writeable), _owner(_owner)
{
_fname.buf[0] = 0;
}

View File

@ -97,9 +97,9 @@ class Genode::Region_map_mmap : public Region_map, public Dataspace
int _dataspace_fd(Capability<Dataspace>);
/**
* Determine whether dataspace is writable
* Determine whether dataspace is writeable
*/
bool _dataspace_writable(Capability<Dataspace>);
bool _dataspace_writeable(Capability<Dataspace>);
public:
@ -134,7 +134,7 @@ class Genode::Region_map_mmap : public Region_map, public Dataspace
size_t size() override { return _size; }
bool writable() override { return true; }
bool writeable() override { return true; }
/**
* Return pseudo dataspace capability of the RM session

View File

@ -32,8 +32,8 @@ struct Genode::Linux_dataspace_client : Rpc_client<Linux_dataspace>
** Generic dataspace interface **
*********************************/
size_t size() override { return call<Rpc_size>(); }
bool writable() override { return call<Rpc_writable>(); }
size_t size() override { return call<Rpc_size>(); }
bool writeable() override { return call<Rpc_writeable>(); }
/****************************************

View File

@ -48,9 +48,9 @@ int Region_map_mmap::_dataspace_fd(Dataspace_capability ds)
}
bool Region_map_mmap::_dataspace_writable(Dataspace_capability ds)
bool Region_map_mmap::_dataspace_writeable(Dataspace_capability ds)
{
return Dataspace_client(ds).writable();
return Dataspace_client(ds).writeable();
}

View File

@ -129,12 +129,12 @@ void *Region_map_mmap::_map_local(Dataspace_capability ds,
bool overmap,
bool writeable)
{
int const fd = _dataspace_fd(ds);
bool const writable = _dataspace_writable(ds) && writeable;
writeable = _dataspace_writeable(ds) && writeable;
int const fd = _dataspace_fd(ds);
int const flags = MAP_SHARED | (overmap ? MAP_FIXED : 0);
int const prot = PROT_READ
| (writable ? PROT_WRITE : 0)
| (writeable ? PROT_WRITE : 0)
| (executable ? PROT_EXEC : 0);
void * const addr_in = use_local_addr ? (void*)local_addr : 0;
void * const addr_out = lx_mmap(addr_in, size, prot, flags, fd, offset);

View File

@ -82,7 +82,7 @@ Core_region_map::attach(Dataspace_capability ds_cap, size_t,
/* map it */
Nova::Utcb &utcb = *reinterpret_cast<Nova::Utcb *>(Thread::myself()->utcb());
const Nova::Rights rights(true, writeable && ds.writable(), executable);
const Nova::Rights rights(true, writeable && ds.writeable(), executable);
if (map_local(platform_specific().core_pd_sel(), utcb,
ds.phys_addr(), reinterpret_cast<addr_t>(virt_ptr),

View File

@ -257,7 +257,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc,
Flexpage page = flex.page();
while (page.valid()) {
Nova::Rights const map_rights (true,
dsc.writable() && attribute.writeable,
dsc.writeable() && attribute.writeable,
attribute.executable);
Nova::Mem_crd const mem(page.addr >> 12, page.log2_order - 12,
map_rights);

View File

@ -251,7 +251,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc,
Vm_space::Map_attr const attr {
.cached = (dsc.cacheability() == CACHED),
.write_combined = (dsc.cacheability() == WRITE_COMBINED),
.writeable = dsc.writable() && attribute.writeable,
.writeable = dsc.writeable() && attribute.writeable,
.executable = attribute.executable,
.flush_support = false };

View File

@ -25,8 +25,8 @@ struct Genode::Dataspace_client : Rpc_client<Dataspace>
explicit Dataspace_client(Dataspace_capability ds)
: Rpc_client<Dataspace>(ds) { }
size_t size() override { return call<Rpc_size>(); }
bool writable() override { return call<Rpc_writable>(); }
size_t size() override { return call<Rpc_size>(); }
bool writeable() override { return call<Rpc_writeable>(); }
};
#endif /* _INCLUDE__DATASPACE__CLIENT_H_ */

View File

@ -30,19 +30,19 @@ struct Genode::Dataspace : Interface
virtual size_t size() = 0;
/**
* Return true if dataspace is writable
* Return true if dataspace is writeable
*/
virtual bool writable() = 0;
virtual bool writeable() = 0;
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_size, size_t, size);
GENODE_RPC(Rpc_writable, bool, writable);
GENODE_RPC(Rpc_size, size_t, size);
GENODE_RPC(Rpc_writeable, bool, writeable);
GENODE_RPC_INTERFACE(Rpc_size, Rpc_writable);
GENODE_RPC_INTERFACE(Rpc_size, Rpc_writeable);
};
#endif /* _INCLUDE__DATASPACE__DATASPACE_H_ */

View File

@ -39,8 +39,8 @@ namespace Genode {
addr_t const _phys_addr = 0; /* address of dataspace in physical memory */
addr_t _core_local_addr = 0; /* address of core-local mapping */
size_t const _size = 0; /* size of dataspace in bytes */
bool const _io_mem = false; /* dataspace is I/O mem, not to be touched */
bool const _writable = false; /* false if dataspace is read-only */
bool const _io_mem = false; /* dataspace is I/O mem, not to be touched */
bool const _writeable = false; /* false if dataspace is read-only */
/*
* Access memory cached, write-combined, or uncached respectively
@ -79,12 +79,12 @@ namespace Genode {
* This constructor is used by RAM and ROM dataspaces.
*/
Dataspace_component(size_t size, addr_t core_local_addr,
Cache cache, bool writable,
Cache cache, bool writeable,
Dataspace_owner *owner)
:
_phys_addr(core_local_addr), _core_local_addr(core_local_addr),
_size(round_page(size)), _io_mem(false),
_writable(writable), _cache(cache),
_writeable(writeable), _cache(cache),
_owner(owner), _managed(false) { }
/**
@ -99,10 +99,10 @@ namespace Genode {
*/
Dataspace_component(size_t size, addr_t core_local_addr,
addr_t phys_addr, Cache cache,
bool writable, Dataspace_owner *owner)
bool writeable, Dataspace_owner *owner)
:
_phys_addr(phys_addr), _core_local_addr(core_local_addr),
_size(size), _io_mem(true), _writable(writable),
_size(size), _io_mem(true), _writeable(writeable),
_cache(cache), _owner(owner), _managed(false) { }
/**
@ -156,8 +156,8 @@ namespace Genode {
** Dataspace interface **
*************************/
size_t size() override { return _size; }
bool writable() override { return _writable; }
size_t size() override { return _size; }
bool writeable() override { return _writeable; }
};
}

View File

@ -213,7 +213,7 @@ int Rm_client::pager(Ipc_pager &pager)
* Check if dataspace is compatible with page-fault type
*/
if (pf_type == Region_map::State::WRITE_FAULT &&
(!region->write() || !dsc->writable())) {
(!region->write() || !dsc->writeable())) {
print_page_fault("attempted write at read-only memory",
pf_addr, pf_ip, pf_type, *this);
@ -346,7 +346,7 @@ Mapping Region_map_component::create_map_item(Region_map_component *,
.io_mem = dataspace.io_mem(),
.dma_buffer = region.dma(),
.write_combined = dataspace.cacheability() == WRITE_COMBINED,
.writeable = region.write() && dataspace.writable(),
.writeable = region.write() && dataspace.writeable(),
.executable = region.executable() };
}

View File

@ -73,7 +73,7 @@ void Vm_session_component::attach(Dataspace_capability const cap,
{
.base = guest_phys,
.size = attribute.size,
.write = dsc.writable() && attribute.writeable,
.write = dsc.writeable() && attribute.writeable,
.exec = attribute.executable,
.off = (off_t)attribute.offset,
.dma = false,

View File

@ -233,7 +233,7 @@ enum {
*/
enum {
PF_X = (1 << 0), /* segment is executable */
PF_W = (1 << 1), /* segment is writable */
PF_W = (1 << 1), /* segment is writeable */
PF_R = (1 << 2), /* segment is readable */
};

View File

@ -153,7 +153,7 @@ namespace Linker {
*/
enum {
PF_X = (1 << 0), /* segment is executable */
PF_W = (1 << 1), /* segment is writable */
PF_W = (1 << 1), /* segment is writeable */
PF_R = (1 << 2), /* segment is readable */
PF_MASK = 0x7,
};

View File

@ -1,5 +1,5 @@
/**
* \brief Overwritable backend-random methods
/*
* \brief Overwriteable backend-random methods
* \author Sebastian Sumpf
* \date 2015-02-13
*/

View File

@ -113,7 +113,7 @@ class Backend
uint64_t block_count() const { return _info.block_count; }
size_t block_size() const { return _info.block_size; }
bool writable() const { return _info.writeable; }
bool writeable() const { return _info.writeable; }
void sync()
{
@ -173,8 +173,8 @@ int rumpuser_open(const char *name, int mode, int *fdp)
if (!(mode & RUMPUSER_OPEN_BIO || Genode::strcmp(GENODE_BLOCK_SESSION, name)))
return ENXIO;
/* check for writable */
if ((mode & RUMPUSER_OPEN_ACCMODE) && !backend().writable())
/* check for writeable */
if ((mode & RUMPUSER_OPEN_ACCMODE) && !backend().writeable())
return EROFS;
*fdp = GENODE_FD;

View File

@ -885,7 +885,7 @@ File system
A file-system service offers the storage and retrieval of data organized in
a hierarchical directory structure. Access to a file system can be restricted
to be read only. The distinction between read-only and read-writable does
to be read only. The distinction between read-only and read-writeable does
not exist per file but for the entire file-system resource.
Of course, many use cases call for finer-grained access control. This is
@ -927,7 +927,7 @@ Block device
~~~~~~~~~~~~
A block-device resource allows for the block-level storage and retrieval
of data whereas a block-device can be read-only or read-writable. The base
of data whereas a block-device can be read-only or read-writeable. The base
system's built-in block service hands out the devices listed at
_/report/drivers/block_devices_ according to the label of the client's session.
The label must correspond to the name of the block device. Typically, the

View File

@ -14,7 +14,7 @@
#include <runtime.h>
void Sculpt::gen_chroot_start_content(Xml_generator &xml, Start_name const &name,
Path const &path, Writeable writable)
Path const &path, Writeable writeable)
{
gen_common_start_content(xml, name,
Cap_quota{100}, Ram_quota{2*1024*1024},
@ -25,7 +25,7 @@ void Sculpt::gen_chroot_start_content(Xml_generator &xml, Start_name const &name
xml.node("config", [&] () {
xml.node("default-policy", [&] () {
xml.attribute("path", path);
if (writable == WRITEABLE)
if (writeable == WRITEABLE)
xml.attribute("writeable", "yes");
});
});

View File

@ -61,7 +61,7 @@ struct File_system::Connection : Genode::Connection<Session>, Session_client
* transmission buffer
* \param label session label
* \param root root directory of session
* \param writeable session is writable
* \param writeable session is writeable
* \param tx_buf_size size of transmission buffer in bytes
*/
Connection(Genode::Env &env,

View File

@ -98,7 +98,7 @@ class Uart::Driver : private Genode::Attached_io_mem_dataspace,
/**
* Register offsets
*
* Registers are read/writable unless explicitly stated.
* Registers are read/writeable unless explicitly stated.
*/
enum Register {
UARTDR = 0x000, /* data */

View File

@ -96,7 +96,7 @@ class Lx_fs::Session_component : private Session_resources,
Genode::Env &_env;
Directory &_root;
Id_space<File_system::Node> _open_node_registry { };
bool _writable;
bool _writeable;
Absolute_path const _root_dir;
Signal_handler _process_packet_dispatcher;
Notifier &_notifier;
@ -258,14 +258,14 @@ class Lx_fs::Session_component : private Session_resources,
Genode::Cap_quota cap_quota,
size_t tx_buf_size,
char const *root_dir,
bool writable,
bool writeable,
Notifier &notifier)
:
Session_resources { env.pd(), env.rm(), ram_quota, cap_quota, tx_buf_size },
Session_rpc_object {_packet_ds.cap(), env.rm(), env.ep().rpc_ep() },
_env { env },
_root { *new (&_alloc) Directory { _alloc, root_dir, false } },
_writable { writable },
_writeable { writeable },
_root_dir { root_dir },
_process_packet_dispatcher { env.ep(), *this, &Session_component::_process_packets },
_notifier { notifier }
@ -328,7 +328,7 @@ class Lx_fs::Session_component : private Session_resources,
Node &dir = open_node.node();
if (!_writable)
if (!_writeable)
if (create || (mode != STAT_ONLY && mode != READ_ONLY))
throw Permission_denied();
@ -367,7 +367,7 @@ class Lx_fs::Session_component : private Session_resources,
/* skip leading '/' */
path_str++;
if (!_writable && create)
if (!_writeable && create)
throw Permission_denied();
if (!path.valid_string())
@ -451,7 +451,7 @@ class Lx_fs::Session_component : private Session_resources,
if (!valid_name(name.string()))
throw Invalid_name();
if (!_writable)
if (!_writeable)
throw Permission_denied();
auto unlink_fn = [&] (Open_node &open_node) {
@ -500,7 +500,7 @@ class Lx_fs::Session_component : private Session_resources,
void truncate(File_handle file_handle, file_size_t size) override
{
if (!_writable)
if (!_writeable)
throw Permission_denied();
auto truncate_fn = [&] (Open_node &open_node) {

View File

@ -72,9 +72,9 @@ append_platform_drv_build_components
build $build_components
if {$use_rumpfs && !$use_ram_fs} {
set rump_writable true
set rump_writeable true
} else {
set rump_writable false
set rump_writeable false
}
set config {
@ -162,7 +162,7 @@ append_if [expr $use_rumpfs] config {
append_if [expr $use_rumpfs && $use_ram_fs && $use_overlay_from_disk] config {
<policy label_prefix="overlay_from_disk" root="/ram" writeable="no"/>}
append_if [expr $use_rumpfs] config {
<default-policy root="/" writeable="} $rump_writable {"/>
<default-policy root="/" writeable="} $rump_writeable {"/>
</config>
<route>
<any-service><child name="part_block"/> <parent/><any-child/></any-service>