Property format the panic message
This commit is contained in:
parent
354e15012e
commit
9cb2debd3a
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue