mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Kernel: Separate VFS stat() from open().
It was very confusing that you had to open a FileDescriptor in order to stat a file. This patch gives VFS a separate stat() function and uses it to implement the stat() and lstat() syscalls.
This commit is contained in:
parent
f5f136931a
commit
ce3b548077
Notes:
sideshowbarker
2024-07-19 15:39:06 +09:00
Author: https://github.com/awesomekling
Commit: ce3b548077
3 changed files with 20 additions and 8 deletions
|
@ -24,7 +24,6 @@
|
|||
#define O_NOFOLLOW 00400000
|
||||
#define O_CLOEXEC 02000000
|
||||
#define O_NOFOLLOW_NOERROR 0x4000000
|
||||
#define O_DONT_OPEN_DEVICE 0x8000000
|
||||
|
||||
class Device;
|
||||
class FileDescriptor;
|
||||
|
@ -70,6 +69,7 @@ public:
|
|||
bool unlink(const String& path, Inode& base, int& error);
|
||||
bool rmdir(const String& path, Inode& base, int& error);
|
||||
bool chmod(const String& path, mode_t, Inode& base, int& error);
|
||||
bool stat(const String& path, int& error, int options, Inode& base, struct stat&);
|
||||
|
||||
void register_device(Device&);
|
||||
void unregister_device(Device&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue