1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:24:58 +00:00

Kernel: Only write text to serial console if no ConsoleDevice attached

Otherwise we write everything twice on the serial port
This commit is contained in:
Sönke Holz 2023-12-12 21:01:53 +01:00 committed by Andrew Kaster
parent b060643941
commit 26752ee8df

View file

@ -69,12 +69,12 @@ static void critical_console_out(char ch)
static void console_out(char ch)
{
if (s_serial_debug_enabled)
serial_putch(ch);
if (DeviceManagement::the().is_console_device_attached()) {
DeviceManagement::the().console_device().put_char(ch);
} else {
if (s_serial_debug_enabled)
serial_putch(ch);
#if ARCH(X86_64)
bochs_debug_output(ch);
#endif