diff options
Diffstat (limited to 'src/kernel/kernel.c')
| -rw-r--r-- | src/kernel/kernel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 1fca95b..b582e85 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,3 +1,4 @@ +#include "kernel.h" #include "print.h" #if defined(__linux__) @@ -40,9 +41,18 @@ void motd() { printf("%c", 188); } +void kernel_panic(const char *error) { + print_set_color(PRINT_COLOR_BLACK, PRINT_COLOR_RED); + print_clear(); + printf(" PANIC! ERROR: %s", error); + for (;;) + ; +} + void kernel_main(void) { print_clear(); motd(); + /* kernel_panic("test_panic."); */ // for (int r = 0; r < 24; r++) { // for (int c = 0; c < 80; c += 3) { // int color = (r + c) % 15 + 1; |
