Skip to content

Commit

Permalink
TTY: Properly implement echo in VirtualConsole.
Browse files Browse the repository at this point in the history
VirtualConsole::echo now actually echoes characters
instead of doing nothing.
  • Loading branch information
DrewStratford authored and awesomekling committed Oct 30, 2019
1 parent ed45f67 commit 378480e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Kernel/TTY/VirtualConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,13 @@ StringView VirtualConsole::tty_name() const
return m_tty_name;
}

void VirtualConsole::echo(u8 ch)
{
if (should_echo_input()) {
on_tty_write(&ch, 1);
}
}

void VirtualConsole::set_vga_start_row(u16 row)
{
m_vga_start_row = row;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/TTY/VirtualConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class VirtualConsole final : public TTY
// ^TTY
virtual ssize_t on_tty_write(const u8*, ssize_t) override;
virtual StringView tty_name() const override;
virtual void echo(u8) override { return; }
virtual void echo(u8) override;

// ^CharacterDevice
virtual const char* class_name() const override { return "VirtualConsole"; }
Expand Down

0 comments on commit 378480e

Please sign in to comment.