From 6a74af80638d183a9eafc57203c577230f60ce0e Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Tue, 26 May 2020 00:36:11 -0700 Subject: 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. --- Kernel/FileSystem/ProcFS.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/FileSystem/ProcFS.h') 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) const override; + virtual KResult traverse_as_directory(Function) const override; virtual RefPtr 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) const override { ASSERT_NOT_REACHED(); } + virtual KResult traverse_as_directory(Function) const override { ASSERT_NOT_REACHED(); } virtual RefPtr 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(); } -- cgit v1.2.3