summaryrefslogtreecommitdiff
path: root/Kernel
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
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')
-rw-r--r--Kernel/VirtualConsole.cpp4
-rwxr-xr-xKernel/sync.sh (renamed from Kernel/sync-sh)1
2 files changed, 3 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);
}
diff --git a/Kernel/sync-sh b/Kernel/sync.sh
index 680f3c33d2..8a16e5329a 100755
--- a/Kernel/sync-sh
+++ b/Kernel/sync.sh
@@ -18,6 +18,7 @@ cp ../Userland/clear mnt/bin/clear
cp ../Userland/tst mnt/bin/tst
cp ../Userland/mm mnt/bin/mm
cp ../Userland/kill mnt/bin/kill
+cp ../Userland/tty mnt/bin/tty
sh sync-local.sh
cp kernel.map mnt/
umount mnt