summaryrefslogtreecommitdiff
path: root/Kernel/TTY/VirtualConsole.h
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-16 15:20:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-16 21:29:36 +0200
commit1c3346e3ceb442de8d52a8f9f756a4c0c737b294 (patch)
tree045b05e5883ecdf75dee93cbf3093e9faedc0358 /Kernel/TTY/VirtualConsole.h
parenta49a15cabf53f300fdac8cb58acc89b19d5792ef (diff)
downloadserenity-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.h2
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;