From 26752ee8df5e04804272a923b38ce47d06eef83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Tue, 12 Dec 2023 21:01:53 +0100 Subject: [PATCH] Kernel: Only write text to serial console if no `ConsoleDevice` attached Otherwise we write everything twice on the serial port --- Kernel/kprintf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/kprintf.cpp b/Kernel/kprintf.cpp index ab21e2414a..233a2edd97 100644 --- a/Kernel/kprintf.cpp +++ b/Kernel/kprintf.cpp @@ -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