2011-02-25 13:40:31 +01:00
|
|
|
#include "common.h"
|
|
|
|
#include <ddekit/panic.h>
|
|
|
|
#include <ddekit/printf.h>
|
|
|
|
|
|
|
|
/****************************************************************************/
|
|
|
|
/* ddekit_panic */
|
|
|
|
/****************************************************************************/
|
2012-03-25 20:25:53 +02:00
|
|
|
void ddekit_panic(char *fmt, ...)
|
2011-02-25 13:40:31 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
int r;
|
|
|
|
va_list va;
|
|
|
|
|
|
|
|
printf("%c[31;1mPANIC: \033[0m\n",0x1b);
|
|
|
|
va_start(va,fmt);
|
|
|
|
r = vprintf(fmt, va);
|
|
|
|
va_end(va);
|
2013-02-02 01:55:35 +01:00
|
|
|
panic("panicced");
|
2011-02-25 13:40:31 +01:00
|
|
|
|
|
|
|
while(1)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************/
|
|
|
|
/* ddekit_debug */
|
|
|
|
/****************************************************************************/
|
2012-03-25 20:25:53 +02:00
|
|
|
void ddekit_debug(char *fmt, ...)
|
2011-02-25 13:40:31 +01:00
|
|
|
{
|
|
|
|
int r;
|
|
|
|
va_list va;
|
|
|
|
va_start(va,fmt);
|
|
|
|
r = vprintf(fmt, va);
|
|
|
|
va_end(va);
|
|
|
|
}
|