diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-16 15:20:35 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-16 21:29:36 +0200 |
commit | 1c3346e3ceb442de8d52a8f9f756a4c0c737b294 (patch) | |
tree | 045b05e5883ecdf75dee93cbf3093e9faedc0358 /Kernel/TTY/MasterPTY.h | |
parent | a49a15cabf53f300fdac8cb58acc89b19d5792ef (diff) | |
download | serenity-1c3346e3ceb442de8d52a8f9f756a4c0c737b294.zip |
Kernel: Use KResultOr<size_t> throughout the TTY subsystem
Previously the VirtualConsole::on_tty_write() method would return an
incorrect value when an error had occurred. This prompted me to
update the TTY subsystem to use KResultOr<size_t> everywhere.
Diffstat (limited to 'Kernel/TTY/MasterPTY.h')
-rw-r--r-- | Kernel/TTY/MasterPTY.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/TTY/MasterPTY.h b/Kernel/TTY/MasterPTY.h index ffc4bf9cb3..abc117b95b 100644 --- a/Kernel/TTY/MasterPTY.h +++ b/Kernel/TTY/MasterPTY.h @@ -21,7 +21,7 @@ public: unsigned index() const { return m_index; } String pts_name() const; - ssize_t on_slave_write(const UserOrKernelBuffer&, ssize_t); + KResultOr<size_t> on_slave_write(const UserOrKernelBuffer&, size_t); bool can_write_from_slave() const; void notify_slave_closed(Badge<SlavePTY>); bool is_closed() const { return m_closed; } |