diff options
Diffstat (limited to 'src/kernel/panic.c')
-rw-r--r-- | src/kernel/panic.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/kernel/panic.c b/src/kernel/panic.c index 5d32bf7..49fdac1 100644 --- a/src/kernel/panic.c +++ b/src/kernel/panic.c @@ -1,19 +1,11 @@ +#include <stdint.h> + #include "log.h" -#include "vga.h" -#include "util.h" __attribute__ ((noreturn)) void panic(const char *filename, uint32_t line, const char *message) { - set_log_mode(LOG_PANIC); - vga_blank(); - logsz("Kernel panic ["); - logsz(filename); - char nbuf[12] = ":"; - u32_dec(line, nbuf + 1); - logsz(nbuf); - logsz("]: "); - logsz(message); - logsz("\nHalting."); + logf(LOG_PANIC, "[%s:%d] %s", filename, line, message); + logf(LOG_INFO, "Halting"); while (1) asm volatile ("hlt"); -}
\ No newline at end of file +} |