diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-07 12:09:52 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-07 13:53:14 +0200 |
commit | b4811324183cc64bd671f93c889fa5e6590e0182 (patch) | |
tree | 083ec95329a20fbcf74f78ce8ea2bf3c9a4055b8 /Kernel/Devices/AsyncDeviceRequest.h | |
parent | 7bf88444993a72f588ce3bd849042c3420e222a7 (diff) | |
download | serenity-b4811324183cc64bd671f93c889fa5e6590e0182.zip |
Kernel: Make UserOrKernelBuffer return KResult from read/write/memset
This allows us to simplify a whole bunch of call sites with TRY(). :^)
Diffstat (limited to 'Kernel/Devices/AsyncDeviceRequest.h')
-rw-r--r-- | Kernel/Devices/AsyncDeviceRequest.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Devices/AsyncDeviceRequest.h b/Kernel/Devices/AsyncDeviceRequest.h index 2afbce1838..a7c2663b50 100644 --- a/Kernel/Devices/AsyncDeviceRequest.h +++ b/Kernel/Devices/AsyncDeviceRequest.h @@ -81,7 +81,7 @@ public: void* get_private() const { return m_private; } template<typename... Args> - [[nodiscard]] bool write_to_buffer(UserOrKernelBuffer& buffer, Args... args) + KResult write_to_buffer(UserOrKernelBuffer& buffer, Args... args) { if (in_target_context(buffer)) return buffer.write(forward<Args>(args)...); @@ -99,7 +99,7 @@ public: } template<typename... Args> - [[nodiscard]] bool read_from_buffer(const UserOrKernelBuffer& buffer, Args... args) + KResult read_from_buffer(const UserOrKernelBuffer& buffer, Args... args) { if (in_target_context(buffer)) return buffer.read(forward<Args>(args)...); |