mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Kernel: Don't assume paths of TTYs and pseudo terminals anymore
The obsolete ttyname and ptsname syscalls are removed. LibC doesn't rely on these anymore, and it helps simplifying the Kernel in many places, so it's an overall an improvement. In addition to that, /proc/PID/tty node is removed too as it is not needed anymore by userspace to get the attached TTY of a process, as /dev/tty (which is already a character device) represents that as well.
This commit is contained in:
parent
de7566c2c4
commit
b5ef900ccd
19 changed files with 13 additions and 141 deletions
|
@ -104,9 +104,7 @@ void VirtualConsole::set_graphical(bool graphical)
|
|||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<VirtualConsole> VirtualConsole::create(size_t index)
|
||||
{
|
||||
auto pts_name = MUST(KString::formatted("/dev/tty/{}", index));
|
||||
|
||||
auto virtual_console_or_error = DeviceManagement::try_create_device<VirtualConsole>(index, move(pts_name));
|
||||
auto virtual_console_or_error = DeviceManagement::try_create_device<VirtualConsole>(index);
|
||||
// FIXME: Find a way to propagate errors
|
||||
VERIFY(!virtual_console_or_error.is_error());
|
||||
return virtual_console_or_error.release_value();
|
||||
|
@ -176,10 +174,9 @@ void VirtualConsole::refresh_after_resolution_change()
|
|||
flush_dirty_lines();
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT VirtualConsole::VirtualConsole(const unsigned index, NonnullOwnPtr<KString> tty_name)
|
||||
UNMAP_AFTER_INIT VirtualConsole::VirtualConsole(const unsigned index)
|
||||
: TTY(4, index)
|
||||
, m_index(index)
|
||||
, m_tty_name(move(tty_name))
|
||||
, m_console_impl(*this)
|
||||
{
|
||||
initialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue