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.
This commit is contained in:
Liav A 2022-02-15 21:24:31 +02:00 committed by Andreas Kling
commit 12867d60ad
Notes: sideshowbarker 2024-07-17 16:53:23 +09:00
4 changed files with 102 additions and 0 deletions

View file

@ -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();