From 5c9c5e454b241d578a173b11fcde0cd179373d41 Mon Sep 17 00:00:00 2001 From: Ian McFarlane Date: Thu, 17 Apr 2025 15:44:27 -0400 Subject: added logging, but we still get warnings about __FUNCTION__ --- kernel/lib/panic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kernel/lib/panic.c') diff --git a/kernel/lib/panic.c b/kernel/lib/panic.c index 72f5c51..3a6e029 100644 --- a/kernel/lib/panic.c +++ b/kernel/lib/panic.c @@ -2,17 +2,19 @@ #include #include -__attribute__((noreturn)) void __panic(const char *line, const char *file, +__attribute__((noreturn)) void __panic(unsigned int line, const char *file, const char *format, ...) { cli(); +#if LOG_LEVEL >= LOG_LVL_PANIC va_list list; va_start(list, format); kprintf("\n\n!!! PANIC !!!\n"); - kprintf("In file %s at line %s:\n", file, line); + kprintf("In file %s at line %d:\n", file, line); kvprintf(format, list); kprintf("\n\n"); log_backtrace(); +#endif while (1) halt(); -- cgit v1.2.3-freya