mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user