diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-05-01 14:29:39 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-02 13:27:37 +0200 |
commit | 234c6ae32d5432bdf836e510fc67756ff750c295 (patch) | |
tree | 03cf2a2738ee8666585feb9c86435d1c2a8e8f54 /Kernel/FileSystem/DevPtsFS.cpp | |
parent | de9b454f897aee3d7b1cd1a8235a40360da5425f (diff) | |
download | serenity-234c6ae32d5432bdf836e510fc67756ff750c295.zip |
Kernel: Change Inode::{read/write}_bytes interface to KResultOr<ssize_t>
The error handling in all these cases was still using the old style
negative values to indicate errors. We have a nicer solution for this
now with KResultOr<T>. This change switches the interface and then all
implementers to use the new style.
Diffstat (limited to 'Kernel/FileSystem/DevPtsFS.cpp')
-rw-r--r-- | Kernel/FileSystem/DevPtsFS.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp index b1df786fe5..7d5204b880 100644 --- a/Kernel/FileSystem/DevPtsFS.cpp +++ b/Kernel/FileSystem/DevPtsFS.cpp @@ -100,12 +100,12 @@ DevPtsFSInode::~DevPtsFSInode() { } -ssize_t DevPtsFSInode::read_bytes(off_t, ssize_t, UserOrKernelBuffer&, FileDescription*) const +KResultOr<ssize_t> DevPtsFSInode::read_bytes(off_t, ssize_t, UserOrKernelBuffer&, FileDescription*) const { VERIFY_NOT_REACHED(); } -ssize_t DevPtsFSInode::write_bytes(off_t, ssize_t, const UserOrKernelBuffer&, FileDescription*) +KResultOr<ssize_t> DevPtsFSInode::write_bytes(off_t, ssize_t, const UserOrKernelBuffer&, FileDescription*) { VERIFY_NOT_REACHED(); } |