mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 19:15:07 +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
|
@ -220,4 +220,11 @@ KResult Socket::shutdown(int how)
|
|||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult Socket::stat(::stat& st) const
|
||||
{
|
||||
memset(&st, 0, sizeof(st));
|
||||
st.st_mode = S_IFSOCK;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue