mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Implement basic chmod() syscall and /bin/chmod helper.
Only raw octal modes are supported right now. This patch also changes mode_t from 32-bit to 16-bit to match the on-disk type used by Ext2FS. I also ran into EPERM being errno=0 which was confusing, so I inserted an ESUCCESS in its place.
This commit is contained in:
@@ -74,6 +74,7 @@ public:
|
||||
bool is_symlink() const { return metadata().isSymbolicLink(); }
|
||||
bool is_directory() const { return metadata().isDirectory(); }
|
||||
bool is_character_device() const { return metadata().isCharacterDevice(); }
|
||||
mode_t mode() const { return metadata().mode; }
|
||||
|
||||
InodeIdentifier identifier() const { return { fsid(), index() }; }
|
||||
virtual InodeMetadata metadata() const = 0;
|
||||
@@ -89,6 +90,7 @@ public:
|
||||
virtual bool remove_child(const String& name, int& error) = 0;
|
||||
virtual RetainPtr<Inode> parent() const = 0;
|
||||
virtual size_t directory_entry_count() const = 0;
|
||||
virtual bool chmod(mode_t, int& error) = 0;
|
||||
|
||||
bool is_metadata_dirty() const { return m_metadata_dirty; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user