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/VirtualConsole.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/VirtualConsole.h')
-rw-r--r-- | Kernel/TTY/VirtualConsole.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/TTY/VirtualConsole.h b/Kernel/TTY/VirtualConsole.h index d776823c2d..8609d76a8f 100644 --- a/Kernel/TTY/VirtualConsole.h +++ b/Kernel/TTY/VirtualConsole.h @@ -91,7 +91,7 @@ private: virtual void on_key_pressed(KeyEvent) override; // ^TTY - virtual ssize_t on_tty_write(const UserOrKernelBuffer&, ssize_t) override; + virtual KResultOr<size_t> on_tty_write(const UserOrKernelBuffer&, size_t) override; virtual String const& tty_name() const override { return m_tty_name; } virtual void echo(u8) override; |