summaryrefslogtreecommitdiff
path: root/lib/panic.c
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-04-19 04:32:55 +0000
committerTom Rini <trini@konsulko.com>2018-04-28 18:32:23 -0400
commit4f1eed7527e256edd10fab85d2651a35e530509f (patch)
treed7f43a4ed86674908bf5794e8c9d0a4db133089d /lib/panic.c
parent14ad44ab466a8f4630c603f4c0bb5c57d0f27ae6 (diff)
downloadu-boot-4f1eed7527e256edd10fab85d2651a35e530509f.tar.gz
spl: Disable printf if not required
Now we have a guard for printf, disable it in the build if it's not selected. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Diffstat (limited to 'lib/panic.c')
-rw-r--r--lib/panic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/panic.c b/lib/panic.c
index e2b8b74b7c..0efa134344 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -37,9 +37,11 @@ void panic_str(const char *str)
void panic(const char *fmt, ...)
{
+#if CONFIG_IS_ENABLED(PRINTF)
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
+#endif
panic_finish();
}