summaryrefslogtreecommitdiffstats
path: root/lib/panic.c
blob: bfe80e8cf62216f40e7934b5a7e94969610aa7fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "panic.h"
#include "print.h"

NORETURN void
_kpanic(const char *file, int line, const char *fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);

    kprintf("KERNEL PANIC:%s:%i: \n", file, line);
    kvprintf(fmt, ap);

    va_end(ap);
    hcf();
}