Property format the panic message

This commit is contained in:
Eryn Wells 2016-03-25 02:15:17 -04:00
parent 354e15012e
commit 9cb2debd3a

View file

@ -6,6 +6,7 @@
* Kernel object. This is the highest level object in the system.
*/
#include <stdarg.h>
#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();
}