Kernel/LibC: Rework TIOC{G,S}WINSZ more linux like
Userspace can freely set terminal size, kernel just updates it when for example new font is loaded. Also SIGWINCH is now sent by kernel instead of userspace.
This commit is contained in:
@@ -181,7 +181,9 @@ namespace Kernel
|
||||
}, 0600, 0, 0)
|
||||
, m_name(MUST(BAN::String::formatted("ttyS{}", s_next_tty_number++)))
|
||||
, m_serial(serial)
|
||||
{}
|
||||
{
|
||||
update_winsize(m_serial.width(), m_serial.height());
|
||||
}
|
||||
|
||||
BAN::ErrorOr<BAN::RefPtr<SerialTTY>> SerialTTY::create(Serial serial)
|
||||
{
|
||||
@@ -254,16 +256,6 @@ namespace Kernel
|
||||
handle_input_byte(*ptr++);
|
||||
}
|
||||
|
||||
uint32_t SerialTTY::width() const
|
||||
{
|
||||
return m_serial.width();
|
||||
}
|
||||
|
||||
uint32_t SerialTTY::height() const
|
||||
{
|
||||
return m_serial.height();
|
||||
}
|
||||
|
||||
bool SerialTTY::putchar_impl(uint8_t ch)
|
||||
{
|
||||
m_serial.putchar(ch);
|
||||
|
||||
Reference in New Issue
Block a user