From 9cb2debd3ac772686a987b9f63ebf9be920dc0fa Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 25 Mar 2016 02:15:17 -0400 Subject: [PATCH] Property format the panic message --- src/Kernel.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Kernel.cc b/src/Kernel.cc index 63fb0e7..3132aa8 100644 --- a/src/Kernel.cc +++ b/src/Kernel.cc @@ -6,6 +6,7 @@ * Kernel object. This is the highest level object in the system. */ +#include #include "Kernel.hh" #include "Interrupts.hh" @@ -72,8 +73,14 @@ Kernel::panic(const char* msg, { mConsole.clear(Console::Color::Magenta); mConsole.printString("PANIC! PANIC! PANIC! :-(\n"); - mConsole.printString(msg); + + va_list args; + va_start(args, msg); + mConsole.printFormat(msg, args); + va_end(args); + // TODO: Dump registers. + halt(); }