From bce944d1498eaa3b6940ee234c863b3548a66b37 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 24 Jan 2021 12:00:11 -0500 Subject: graphics! --- src/kernel/panic.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/kernel/panic.c') 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 + #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 +} -- cgit v1.2.3