1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

Kernel: Keep TTY names in character buffers instead of Strings

Just going over some little unnecessary little kmalloc allocations.
This commit is contained in:
Andreas Kling 2019-10-18 14:13:43 +02:00
parent 2305dee455
commit 2f37fa487d
7 changed files with 27 additions and 31 deletions

View file

@ -10,7 +10,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
, m_master(master)
, m_index(index)
{
m_tty_name = String::format("/dev/pts/%u", m_index);
ksprintf(m_tty_name, "/dev/pts/%u", m_index);
set_uid(current->process().uid());
set_gid(current->process().gid());
DevPtsFS::register_slave_pty(*this);
@ -25,7 +25,7 @@ SlavePTY::~SlavePTY()
DevPtsFS::unregister_slave_pty(*this);
}
String SlavePTY::tty_name() const
StringView SlavePTY::tty_name() const
{
return m_tty_name;
}