mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +00:00
committed by
Christian Helmuth
parent
15141f3ca7
commit
807be83b1b
@ -45,7 +45,7 @@ namespace File_system {
|
||||
void assert_valid_range(seek_off_t start, size_t len,
|
||||
file_size_t chunk_size) const
|
||||
{
|
||||
if (is_zero()) return;
|
||||
if (zero()) return;
|
||||
|
||||
if (start < _base_offset)
|
||||
throw Index_out_of_range();
|
||||
@ -77,7 +77,7 @@ namespace File_system {
|
||||
/**
|
||||
* Return true if chunk is a read-only zero chunk
|
||||
*/
|
||||
bool is_zero() const { return _base_offset == (seek_off_t)(~0L); }
|
||||
bool zero() const { return _base_offset == (seek_off_t)(~0L); }
|
||||
|
||||
/**
|
||||
* Return true if chunk has no allocated sub chunks
|
||||
@ -318,7 +318,7 @@ namespace File_system {
|
||||
void operator () (Entry &entry, char *dst, size_t len,
|
||||
seek_off_t seek_offset) const
|
||||
{
|
||||
if (entry.is_zero())
|
||||
if (entry.zero())
|
||||
memset(dst, 0, len);
|
||||
else
|
||||
entry.read(dst, len, seek_offset);
|
||||
|
@ -125,7 +125,7 @@ namespace File_system {
|
||||
if (!sub_node)
|
||||
throw Lookup_failed();
|
||||
|
||||
if (is_basename(path)) {
|
||||
if (!contains_path_delimiter(path)) {
|
||||
|
||||
/*
|
||||
* Because 'path' is a basename that corresponds to an
|
||||
|
@ -68,7 +68,7 @@ namespace Trace_fs {
|
||||
|
||||
bool last_entry() const
|
||||
{
|
||||
return current_entry.is_last();
|
||||
return current_entry.last();
|
||||
}
|
||||
|
||||
void rewind() { current_entry = buffer->first(); }
|
||||
|
@ -840,7 +840,7 @@ class File_system::Session_component : public Session_rpc_object
|
||||
if (create)
|
||||
throw Permission_denied();
|
||||
|
||||
if (!path.is_valid_string())
|
||||
if (!path.valid_string())
|
||||
throw Name_too_long();
|
||||
|
||||
Directory *dir = dynamic_cast<Directory*>(_root_dir.lookup(path_str + 1));
|
||||
|
Reference in New Issue
Block a user