diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-12-08 10:11:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-05 11:30:58 +0100 |
commit | ce5299b0bf8c8f31a701fe5f8de1fb02111ef0cd (patch) | |
tree | da5007e4038593c34956b6cd84528bb9349b511c /lib/vsprintf.c | |
parent | c20983fad59b733e98f253fbc8c1802ef66bba09 (diff) | |
download | barebox-ce5299b0bf8c8f31a701fe5f8de1fb02111ef0cd.tar.gz barebox-ce5299b0bf8c8f31a701fe5f8de1fb02111ef0cd.tar.xz |
printf: move panic() to common/misc.c
panic() is not really a printf like function, so move it to common/misc.c.
This is done because we want to have printf support in the PBL, but PBL
has it's own panic() implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 512c88247f..a1f95fed26 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -680,24 +680,3 @@ char *asprintf(const char *fmt, ...) return p; } EXPORT_SYMBOL(asprintf); - -void __noreturn panic(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - vprintf(fmt, args); - putchar('\n'); - va_end(args); - - dump_stack(); - - led_trigger(LED_TRIGGER_PANIC, TRIGGER_ENABLE); - - if (IS_ENABLED(CONFIG_PANIC_HANG)) { - hang(); - } else { - udelay(100000); /* allow messages to go out */ - reset_cpu(0); - } -} -EXPORT_SYMBOL(panic); |