summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/InodeWatcher.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-04 18:02:23 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-04 18:17:16 +0200
commit7a3ab6c517649e9dfdd50085f10492212b0bcb18 (patch)
treef251cfc69ebe5f253c1e900c10b9485136b315cd /Kernel/FileSystem/InodeWatcher.h
parent58feebeed28bab04e7b462f7cd3beb81984f116e (diff)
downloadserenity-7a3ab6c517649e9dfdd50085f10492212b0bcb18.zip
Kernel: Make File::write() and File::read() return KResultOr<size_t>
Instead of returning a ssize_t where negative values mean error, we now return KResultOr<size_t> and use the error state to report errors exclusively.
Diffstat (limited to 'Kernel/FileSystem/InodeWatcher.h')
-rw-r--r--Kernel/FileSystem/InodeWatcher.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/InodeWatcher.h b/Kernel/FileSystem/InodeWatcher.h
index 626f190d56..31a094b88f 100644
--- a/Kernel/FileSystem/InodeWatcher.h
+++ b/Kernel/FileSystem/InodeWatcher.h
@@ -55,8 +55,8 @@ public:
virtual bool can_read(const FileDescription&, size_t) const override;
virtual bool can_write(const FileDescription&, size_t) const override;
- virtual ssize_t read(FileDescription&, size_t, u8*, ssize_t) override;
- virtual ssize_t write(FileDescription&, size_t, const u8*, ssize_t) override;
+ virtual KResultOr<size_t> read(FileDescription&, size_t, u8*, size_t) override;
+ virtual KResultOr<size_t> write(FileDescription&, size_t, const u8*, size_t) override;
virtual String absolute_path(const FileDescription&) const override;
virtual const char* class_name() const override { return "InodeWatcher"; };