diff options
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/assert.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/stdlib/assert.c b/lib/stdlib/assert.c index 3486e50b1..3c0bd166f 100644 --- a/lib/stdlib/assert.c +++ b/lib/stdlib/assert.c @@ -32,15 +32,18 @@ #include <debug.h> #include <platform.h> -/* - * This is a basic implementation. This could be improved. - */ -void __assert (const char *function, const char *file, unsigned int line, +void __assert(const char *function, const char *file, unsigned int line, const char *assertion) { +#if LOG_LEVEL >= LOG_LEVEL_INFO + /* + * Only print the output if LOG_LEVEL is higher or equal to + * LOG_LEVEL_INFO, which is the default value for builds with DEBUG=1. + */ tf_printf("ASSERT: %s <%d> : %s\n", function, line, assertion); console_flush(); +#endif plat_panic_handler(); } |