Kernel: Init receive buffer for dynamically created VirtIO console port

We already init receive buffer if we have singleport console, but if
we have multiport console that dynamically allocates ports we never
initted their receive buffers.
This commit is contained in:
Sviatoslav Peleshko 2022-02-20 19:05:14 +02:00 committed by Brian Gianforcaro
parent 9399698aaa
commit 073f472c51
Notes: sideshowbarker 2024-07-17 18:27:46 +09:00

View file

@ -162,7 +162,9 @@ void Console::process_control_message(ControlMessage message)
return;
}
m_ports.at(id) = MUST(DeviceManagement::the().try_create_device<VirtIO::ConsolePort>(id, *this));
auto port = MUST(DeviceManagement::the().try_create_device<VirtIO::ConsolePort>(id, *this));
port->init_receive_buffer({});
m_ports.at(id) = port;
ControlMessage ready_event {
.id = static_cast<u32>(id),