summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FIFO.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-08 00:51:39 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 01:10:53 +0100
commit79fa9765ca89869d19364143989436d117974c21 (patch)
tree3af62f70127d9217d841047f6b7461351800d1ae /Kernel/FileSystem/FIFO.h
parent7ee10c69264cb278845a1e1b06d5acf2e5e7ddf0 (diff)
downloadserenity-79fa9765ca89869d19364143989436d117974c21.zip
Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
Diffstat (limited to 'Kernel/FileSystem/FIFO.h')
-rw-r--r--Kernel/FileSystem/FIFO.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h
index 6352360863..9c20a81452 100644
--- a/Kernel/FileSystem/FIFO.h
+++ b/Kernel/FileSystem/FIFO.h
@@ -24,13 +24,13 @@ public:
Writer
};
- static KResultOr<NonnullRefPtr<FIFO>> try_create(UserID);
+ static ErrorOr<NonnullRefPtr<FIFO>> try_create(UserID);
virtual ~FIFO() override;
UserID uid() const { return m_uid; }
- KResultOr<NonnullRefPtr<OpenFileDescription>> open_direction(Direction);
- KResultOr<NonnullRefPtr<OpenFileDescription>> open_direction_blocking(Direction);
+ ErrorOr<NonnullRefPtr<OpenFileDescription>> open_direction(Direction);
+ ErrorOr<NonnullRefPtr<OpenFileDescription>> open_direction_blocking(Direction);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
@@ -40,12 +40,12 @@ public:
private:
// ^File
- virtual KResultOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
- virtual KResultOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
- virtual KResult stat(::stat&) const override;
+ virtual ErrorOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
+ virtual ErrorOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
+ virtual ErrorOr<void> stat(::stat&) const override;
virtual bool can_read(const OpenFileDescription&, size_t) const override;
virtual bool can_write(const OpenFileDescription&, size_t) const override;
- virtual KResultOr<NonnullOwnPtr<KString>> pseudo_path(const OpenFileDescription&) const override;
+ virtual ErrorOr<NonnullOwnPtr<KString>> pseudo_path(const OpenFileDescription&) const override;
virtual StringView class_name() const override { return "FIFO"sv; }
virtual bool is_fifo() const override { return true; }