From 79fa9765ca89869d19364143989436d117974c21 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 8 Nov 2021 00:51:39 +0100 Subject: Kernel: Replace KResult and KResultOr with Error and ErrorOr We now use AK::Error and AK::ErrorOr 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. :^) --- Kernel/Storage/StorageDevice.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Kernel/Storage/StorageDevice.h') diff --git a/Kernel/Storage/StorageDevice.h b/Kernel/Storage/StorageDevice.h index 86b1b38d48..eda1216197 100644 --- a/Kernel/Storage/StorageDevice.h +++ b/Kernel/Storage/StorageDevice.h @@ -37,9 +37,9 @@ public: virtual u64 max_addressable_block() const { return m_max_addressable_block; } // ^BlockDevice - virtual KResultOr read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override; + virtual ErrorOr read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override; virtual bool can_read(const OpenFileDescription&, size_t) const override; - virtual KResultOr write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override; + virtual ErrorOr write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override; virtual bool can_write(const OpenFileDescription&, size_t) const override; virtual void prepare_for_unplug() { m_partitions.clear(); } @@ -51,7 +51,7 @@ public: virtual CommandSet command_set() const = 0; // ^File - virtual KResult ioctl(OpenFileDescription&, unsigned request, Userspace arg) final; + virtual ErrorOr ioctl(OpenFileDescription&, unsigned request, Userspace arg) final; protected: StorageDevice(int, int, size_t, u64, NonnullOwnPtr); -- cgit v1.2.3