projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
imx8: ahab: fix some bad debug message formating
[platform/kernel/u-boot.git]
/
lib
/
panic.c
diff --git
a/lib/panic.c
b/lib/panic.c
index
e2b8b74
..
8e72c26
100644
(file)
--- a/
lib/panic.c
+++ b/
lib/panic.c
@@
-10,6
+10,7
@@
*/
#include <common.h>
*/
#include <common.h>
+#include <hang.h>
#if !defined(CONFIG_PANIC_HANG)
#include <command.h>
#endif
#if !defined(CONFIG_PANIC_HANG)
#include <command.h>
#endif
@@
-37,9
+38,19
@@
void panic_str(const char *str)
void panic(const char *fmt, ...)
{
void panic(const char *fmt, ...)
{
+#if CONFIG_IS_ENABLED(PRINTF)
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
+#endif
panic_finish();
}
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);
+}