mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
Kernel: Virtualize the File::stat() operation
Instead of FileDescriptor branching on the type of File it's wrapping, add a File::stat() function that can be overridden to provide custom behavior for the stat syscalls.
This commit is contained in:
parent
5444cabd39
commit
22831033d0
6 changed files with 28 additions and 20 deletions
|
@ -59,6 +59,7 @@ private:
|
|||
// ^File
|
||||
virtual KResultOr<size_t> write(FileDescription&, size_t, const u8*, size_t) override;
|
||||
virtual KResultOr<size_t> read(FileDescription&, size_t, u8*, size_t) override;
|
||||
virtual KResult stat(::stat&) const override;
|
||||
virtual bool can_read(const FileDescription&, size_t) const override;
|
||||
virtual bool can_write(const FileDescription&, size_t) const override;
|
||||
virtual String absolute_path(const FileDescription&) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue