summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/SysFS.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-14 13:32:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-14 13:34:59 +0200
commitef2720bcad5840a6e174492eb55046e9edacc782 (patch)
tree81b8bdaf03b1ec32fae5b648f864d4f703077eed /Kernel/FileSystem/SysFS.h
parent459115a59c05ef478b2f99f4089343ef64d65a1c (diff)
downloadserenity-ef2720bcad5840a6e174492eb55046e9edacc782.zip
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.
Diffstat (limited to 'Kernel/FileSystem/SysFS.h')
-rw-r--r--Kernel/FileSystem/SysFS.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h
index d52d6e77f3..836a0220c9 100644
--- a/Kernel/FileSystem/SysFS.h
+++ b/Kernel/FileSystem/SysFS.h
@@ -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;
};
}