mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] pbl: fix panic() message printing
Date: Thu, 26 Feb 2026 12:07:58 +0100	[thread overview]
Message-ID: <20260226110758.505072-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20260226110758.505072-1-s.hauer@pengutronix.de>

printf() takes variadic arguments, not a va_list. Use vprintf() to
correctly print messages containing arguments.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 pbl/misc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pbl/misc.c b/pbl/misc.c
index 075c6a854b..c0e4473655 100644
--- a/pbl/misc.c
+++ b/pbl/misc.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <stdio.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
@@ -16,8 +17,9 @@ void __noreturn panic(const char *fmt, ...)
 	va_list args;
 
 	va_start(args, fmt);
-	printf(fmt, args);
+	vprintf(fmt, args);
 	va_end(args);
+
 	while(1);
 }
 
-- 
2.47.3




  reply	other threads:[~2026-02-26 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 11:07 [PATCH 1/2] pbl: console: implement vprintf() Sascha Hauer
2026-02-26 11:07 ` Sascha Hauer [this message]
2026-03-04  7:36 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260226110758.505072-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox