diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-05-26 00:36:11 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-26 10:15:40 +0200 |
commit | 6a74af80638d183a9eafc57203c577230f60ce0e (patch) | |
tree | 346d397545c699959e66c048cf771fc1f2f0ac13 /Kernel/FileSystem/ProcFS.h | |
parent | c459e4ecb2ca6057deddb64e3cae7cc8061516bb (diff) | |
download | serenity-6a74af80638d183a9eafc57203c577230f60ce0e.zip |
Kernel: Plumb KResult through FileDescription::read_entire_file() implementation.
Allow file system implementation to return meaningful error codes to
callers of the FileDescription::read_entire_file(). This allows both
Process::sys$readlink() and Process::sys$module_load() to return more
detailed errors to the user.
Diffstat (limited to 'Kernel/FileSystem/ProcFS.h')
-rw-r--r-- | Kernel/FileSystem/ProcFS.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/ProcFS.h b/Kernel/FileSystem/ProcFS.h index 978b704018..d498c27b0a 100644 --- a/Kernel/FileSystem/ProcFS.h +++ b/Kernel/FileSystem/ProcFS.h @@ -101,7 +101,7 @@ private: // ^Inode virtual ssize_t read_bytes(off_t, ssize_t, u8* buffer, FileDescription*) const override; virtual InodeMetadata metadata() const override; - virtual bool traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) const override; + virtual KResult traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) const override; virtual RefPtr<Inode> lookup(StringView name) override; virtual void flush_metadata() override; virtual ssize_t write_bytes(off_t, ssize_t, const u8* buffer, FileDescription*) override; @@ -127,7 +127,7 @@ private: // ^Inode virtual ssize_t read_bytes(off_t, ssize_t, u8*, FileDescription*) const override { ASSERT_NOT_REACHED(); } virtual InodeMetadata metadata() const override; - virtual bool traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) const override { ASSERT_NOT_REACHED(); } + virtual KResult traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) const override { ASSERT_NOT_REACHED(); } virtual RefPtr<Inode> lookup(StringView name) override; virtual void flush_metadata() override {}; virtual ssize_t write_bytes(off_t, ssize_t, const u8*, FileDescription*) override { ASSERT_NOT_REACHED(); } |