mxs_nand: Update compatible string for i.MX6SX
[oweals/u-boot.git] / lib / panic.c
index e2b8b74b7cd418566466ff308d15f7ebe2cba5bb..8e72c265a617e1f2223a008e5375829537b8c49b 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <hang.h>
 #if !defined(CONFIG_PANIC_HANG)
 #include <command.h>
 #endif
@@ -37,9 +38,19 @@ 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();
 }
+
+void __assert_fail(const char *assertion, const char *file, unsigned int line,
+                  const char *function)
+{
+       /* This will not return */
+       panic("%s:%u: %s: Assertion `%s' failed.", file, line, function,
+             assertion);
+}