core: panic: use LOG_ERROR instead of printf

pr/gpio
Kaspar Schleiser 8 years ago
parent 5433c42187
commit cc1771787e

@ -32,6 +32,7 @@
#include "panic.h"
#include "arch/panic_arch.h"
#include "reboot.h"
#include "log.h"
#if defined(DEVELHELP) && defined(MODULE_PS)
#include "ps.h"
@ -55,18 +56,16 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message)
cpu_print_last_instruction();
}
#endif
puts("*** RIOT kernel panic:");
puts(message);
puts("");
LOG_ERROR("*** RIOT kernel panic:\n%s\n\n", message);
#ifdef DEVELHELP
#ifdef MODULE_PS
ps();
puts("");
LOG_ERROR("\n");
#endif
puts("*** halted.\n");
LOG_ERROR("*** halted.\n\n");
#else
puts("*** rebooting...\n\n");
LOG_ERROR("*** rebooting...\n\n");
#endif
}
/* disable watchdog and all possible sources of interrupts */

Loading…
Cancel
Save