mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
Kernel: Make File::stat() & friends return Error<struct stat>
Instead of making the caller provide a stat buffer, let's just return one as a value.
This commit is contained in:
parent
1f2d0d0ad4
commit
0ae8702692
10 changed files with 19 additions and 20 deletions
|
@ -91,7 +91,7 @@ public:
|
|||
virtual ErrorOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) = 0;
|
||||
virtual ErrorOr<void> ioctl(OpenFileDescription&, unsigned request, Userspace<void*> arg);
|
||||
virtual ErrorOr<Memory::Region*> mmap(Process&, OpenFileDescription&, Memory::VirtualRange const&, u64 offset, int prot, bool shared);
|
||||
virtual ErrorOr<void> stat(::stat&) const { return EBADF; }
|
||||
virtual ErrorOr<struct stat> stat() const { return EBADF; }
|
||||
|
||||
// Although this might be better described "name" or "description", these terms already have other meanings.
|
||||
virtual ErrorOr<NonnullOwnPtr<KString>> pseudo_path(const OpenFileDescription&) const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue