From e307db47eb93a2107e1b4dae57130b003be78c65 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 16 Jan 2023 15:44:27 +0200 Subject: [PATCH] Kernel: Kernel::Panic() will now always print to serial output --- kernel/include/kernel/Panic.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/include/kernel/Panic.h b/kernel/include/kernel/Panic.h index 4acf727a9..434e964e7 100644 --- a/kernel/include/kernel/Panic.h +++ b/kernel/include/kernel/Panic.h @@ -13,17 +13,14 @@ namespace Kernel __attribute__((__noreturn__)) static void PanicImpl(const char* file, int line, const char* message, Args... args) { + derrorln("Kernel panic at {}:{}", file, line); + derrorln(message, args...); if (TTY::IsInitialized()) { kprint("\e[31mKernel panic at {}:{}\n", file, line); kprint(message, args...); kprint("\e[m\n"); } - else - { - derrorln("Kernel panic at {}:{}", file, line); - derrorln(message, args...); - } asm volatile("cli; hlt"); __builtin_unreachable(); }