summaryrefslogtreecommitdiff
path: root/Kernel/init.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-02-15 21:24:31 +0200
committerAndreas Kling <kling@serenityos.org>2022-03-22 20:26:05 +0100
commit12867d60adaf8fa4f1d6e22b33d5b6c971be0d64 (patch)
tree1766b741565b8b8b1c17150f4f2c438c29367084 /Kernel/init.cpp
parent2fb9eb52576529001d68063e314e848c674d076a (diff)
downloadserenity-12867d60adaf8fa4f1d6e22b33d5b6c971be0d64.zip
Kernel: Create SelfTTYDevice class to help replace /dev/tty symlink
This will replace the /dev/tty symlink created by SystemServer, so instead of a symlink, a character device will be created. When doing read(2), write(2) and ioctl(2) on this device, it will "redirect" these operations to the attached TTY of the current process.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r--Kernel/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index d51d452956..8af64861fd 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -23,6 +23,7 @@
#include <Kernel/Devices/NullDevice.h>
#include <Kernel/Devices/PCISerialDevice.h>
#include <Kernel/Devices/RandomDevice.h>
+#include <Kernel/Devices/SelfTTYDevice.h>
#include <Kernel/Devices/SerialDevice.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/Devices/ZeroDevice.h>
@@ -348,6 +349,7 @@ void init_stage2(void*)
(void)ZeroDevice::must_create().leak_ref();
(void)FullDevice::must_create().leak_ref();
(void)RandomDevice::must_create().leak_ref();
+ (void)SelfTTYDevice::must_create().leak_ref();
PTYMultiplexer::initialize();
AudioManagement::the().initialize();