mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Kernel/ProcFS: Provide a way to write to ProcFS inodes
ProcFSGlobalInode now calls `write_bytes()`, `truncate()` and `set_mtime()` on its associated component. This allows us to write 0 or 1 to a ProcFSSystemBoolean component to toggle a boolean value.
This commit is contained in:
parent
f8e89306e0
commit
3d174e3ad2
4 changed files with 58 additions and 11 deletions
|
@ -62,7 +62,6 @@ protected:
|
|||
virtual KResult remove_child(const StringView& name) override final;
|
||||
virtual KResult chmod(mode_t) override final;
|
||||
virtual KResult chown(UserID, GroupID) override final;
|
||||
virtual KResult truncate(u64) override final;
|
||||
};
|
||||
|
||||
class ProcFSGlobalInode : public ProcFSInode {
|
||||
|
@ -84,6 +83,8 @@ protected:
|
|||
virtual InodeMetadata metadata() const override;
|
||||
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual KResultOr<NonnullRefPtr<Inode>> lookup(StringView) override;
|
||||
virtual KResult truncate(u64) override final;
|
||||
virtual KResult set_mtime(time_t) override final;
|
||||
|
||||
NonnullRefPtr<ProcFSExposedComponent> m_associated_component;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue