mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
file system: enhanced file status info
This patch extends the 'File_system::Status', 'File_system::Directory_entry', and the related 'Vfs' types with the following additional information: - Distinction between continuous and transactional files (Node_type) (issue #3507) - Readable, writeable, and executable attributes (Node_rwx), replacing the former 'mode' bits (issue #3030) The types 'Node_rwx', 'Node_type' are defined twice, once for the VFS (vfs/types.h) and once for the 'File_system' session (file_system_session/file_system_session.h). Similarly, there is a direct correspondance between 'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'. This duplication of types follows the existing pattern of keeping the VFS and file-system session independent from each other.
This commit is contained in:
committed by
Christian Helmuth
parent
1297a8fb57
commit
5ab1505d43
@ -103,7 +103,8 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
|
||||
Rtc_file_system(Vfs::Env &env, Genode::Xml_node config)
|
||||
:
|
||||
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config),
|
||||
Single_file_system(Node_type::TRANSACTIONAL_FILE, name(),
|
||||
Node_rwx::ro(), config),
|
||||
_rtc(env.env()),
|
||||
_set_signal_handler(env.env().ep(), *this,
|
||||
&Rtc_file_system::_handle_set_signal)
|
||||
@ -136,10 +137,7 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
|
||||
Stat_result stat(char const *path, Stat &out) override
|
||||
{
|
||||
Stat_result result = Single_file_system::stat(path, out);
|
||||
out.mode |= 0444;
|
||||
|
||||
return result;
|
||||
return Single_file_system::stat(path, out);
|
||||
}
|
||||
|
||||
Watch_result watch(char const *path,
|
||||
|
Reference in New Issue
Block a user