diff options
Diffstat (limited to 'sys/base/error/panicf.c')
-rw-r--r-- | sys/base/error/panicf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/base/error/panicf.c b/sys/base/error/panicf.c new file mode 100644 index 0000000..d698576 --- /dev/null +++ b/sys/base/error/panicf.c @@ -0,0 +1,16 @@ +#include "internal.h" + +void +panicf(byte* fmt, ...) +{ + va_list args; + va_start(args, fmt); + + printf("panic: "); + vprintf(fmt, args); + printf("\n"); + + va_end(args); + + exit(1); +} |