Add a /bin/tty command that prints the current tty.

Also fix ttyname() syscall to include "/dev/" in the name.
This commit is contained in:
Andreas Kling 2018-10-31 21:45:36 +01:00
commit c7d5ce6b5a
Notes: sideshowbarker 2024-07-19 18:35:34 +09:00
6 changed files with 28 additions and 5 deletions

View file

@ -400,7 +400,7 @@ void VirtualConsole::onTTYWrite(byte ch)
String VirtualConsole::ttyName() const
{
char buf[8];
ksprintf(buf, "tty%u", m_index);
char buf[16];
ksprintf(buf, "/dev/tty%u", m_index);
return String(buf);
}