summaryrefslogtreecommitdiff
path: root/kernel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lib')
-rw-r--r--kernel/lib/panic.c6
1 files changed, 4 insertions, 2 deletions
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 <stdarg.h>
#include <comus/asm.h>
-__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();