[PATCH 1/2] common: prefix panic with PANIC:

Ahmad Fatoum a.fatoum at barebox.org
Wed Aug 6 05:47:15 PDT 2025


This makes it easier to match against in the test suite.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 common/misc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/misc.c b/common/misc.c
index ce1fbc284f48..af22579af16f 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -289,6 +289,8 @@ BAREBOX_MAGICVAR(global.of.kernel.add_machine_compatible, "Extra machine/board c
 
 static void __noreturn do_panic(bool stacktrace, const char *fmt, va_list ap)
 {
+	if (*fmt)
+		eprintf("PANIC: ");
 	veprintf(fmt, ap);
 	eputchar('\n');
 
-- 
2.39.5




More information about the barebox mailing list