1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Kernel: Let inodes provide pre-open file descriptions

Some magical inodes, such as /proc/pid/fd/fileno, are going to want to open() to
a custom FileDescription, so add a hook for that.
This commit is contained in:
Sergey Bugaev 2020-01-15 14:03:14 +03:00 committed by Andreas Kling
parent ae64fd1b27
commit 8642a7046c
3 changed files with 13 additions and 2 deletions

View file

@ -61,6 +61,8 @@ public:
bool bind_socket(LocalSocket&);
bool unbind_socket();
virtual FileDescription* preopen_fd() { return nullptr; };
bool is_metadata_dirty() const { return m_metadata_dirty; }
virtual int set_atime(time_t);