mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
Kernel: Make Inode::lookup() return a KResultOr<NonnullRefPtr<Inode>>
This allows file systems to return arbitrary error codes instead of just an Inode or not an Inode.
This commit is contained in:
parent
459115a59c
commit
ef2720bcad
18 changed files with 83 additions and 72 deletions
|
@ -85,7 +85,7 @@ protected:
|
|||
SysFSInode(SysFS const&, SysFSComponent const&);
|
||||
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer& buffer, FileDescription*) const override;
|
||||
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual RefPtr<Inode> lookup(StringView name) override;
|
||||
virtual KResultOr<NonnullRefPtr<Inode>> lookup(StringView name) override;
|
||||
virtual void flush_metadata() override;
|
||||
virtual InodeMetadata metadata() const override;
|
||||
virtual KResultOr<size_t> write_bytes(off_t, size_t, UserOrKernelBuffer const&, FileDescription*) override;
|
||||
|
@ -114,7 +114,7 @@ protected:
|
|||
// ^Inode
|
||||
virtual InodeMetadata metadata() const override;
|
||||
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const override;
|
||||
virtual RefPtr<Inode> lookup(StringView name) override;
|
||||
virtual KResultOr<NonnullRefPtr<Inode>> lookup(StringView name) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue