summaryrefslogtreecommitdiff
path: root/Kernel/VirtualConsole.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-31 21:45:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-10-31 21:46:05 +0100
commitc7d5ce6b5a2b031d8fe5d319f158d91be66ca998 (patch)
tree887bdac95040605f56b1d8235f84951220048678 /Kernel/VirtualConsole.cpp
parent4605b549d6483116420bc5e5f54d9591f84986a1 (diff)
downloadserenity-c7d5ce6b5a2b031d8fe5d319f158d91be66ca998.zip
Add a /bin/tty command that prints the current tty.
Also fix ttyname() syscall to include "/dev/" in the name.
Diffstat (limited to 'Kernel/VirtualConsole.cpp')
-rw-r--r--Kernel/VirtualConsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/VirtualConsole.cpp b/Kernel/VirtualConsole.cpp
index eea5bb2bb7..b6479493e6 100644
--- a/Kernel/VirtualConsole.cpp
+++ b/Kernel/VirtualConsole.cpp
@@ -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);
}