summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-02-15 21:26:29 +0200
committerAndreas Kling <kling@serenityos.org>2022-03-22 20:26:05 +0100
commite508073168ef8cf1dc0e0763ee92adfe64b9cb8d (patch)
treea98f8c9a2f9fe8fb55d4ff1b24343eae0f7e7b93 /Userland
parent12867d60adaf8fa4f1d6e22b33d5b6c971be0d64 (diff)
downloadserenity-e508073168ef8cf1dc0e0763ee92adfe64b9cb8d.zip
SystemServer: Create /dev/tty as a character device instead of a symlink
The new device has major number 5, minor number 0, and is represented by the SelfTTYDevice class in the Kernel.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Services/SystemServer/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp
index 367cc3880d..97c07259f0 100644
--- a/Userland/Services/SystemServer/main.cpp
+++ b/Userland/Services/SystemServer/main.cpp
@@ -315,6 +315,10 @@ static void populate_devtmpfs_devices_based_on_devctl()
create_devtmpfs_char_device("/dev/ptmx", 0666, 5, 2);
break;
}
+ case 0: {
+ create_devtmpfs_char_device("/dev/tty", 0666, 5, 0);
+ break;
+ }
default:
warnln("Unknown character device {}:{}", major_number, minor_number);
}
@@ -393,7 +397,6 @@ static ErrorOr<void> prepare_synthetic_filesystems()
TRY(Core::System::symlink("/proc/self/fd/0", "/dev/stdin"));
TRY(Core::System::symlink("/proc/self/fd/1", "/dev/stdout"));
TRY(Core::System::symlink("/proc/self/fd/2", "/dev/stderr"));
- TRY(Core::System::symlink("/proc/self/tty", "/dev/tty"));
populate_devtmpfs();