diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-28 06:46:04 -0600 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-28 06:46:04 -0600 |
| commit | 2d54f6f129cedad272084f4cfe3731309f4c462e (patch) | |
| tree | 0459fc1d595b251ea8a8eb19b17105ae4c200faf /src/kernel/exceptions.c | |
| parent | 67e379966c657eccb3086508fa9bff38b831fbde (diff) | |
| download | gftos-2d54f6f129cedad272084f4cfe3731309f4c462e.tar.gz | |
Enabled paging
Diffstat (limited to 'src/kernel/exceptions.c')
| -rw-r--r-- | src/kernel/exceptions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/kernel/exceptions.c b/src/kernel/exceptions.c index 11e45fb..bd81c08 100644 --- a/src/kernel/exceptions.c +++ b/src/kernel/exceptions.c @@ -1,9 +1,14 @@ #include "print.h" +#include <stdarg.h> -__attribute__((noreturn)) void panic(const char *msg) { +__attribute__((noreturn)) void panic(const char *msg, ...) { + va_list args; + va_start(args, msg); print_set_color(PRINT_COLOR_BLACK, PRINT_COLOR_RED); print_clear(); - printf("PANIC!!\n\t%s", msg); + printf("PANIC!!\n\t"); + printf_logic(msg, args); + va_end(args); __asm__ volatile("cli; hlt"); while (1) ; |
