mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +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:
parent
2305dee455
commit
2f37fa487d
7 changed files with 27 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue