mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] pbl: console: fix undefined reference to vprintf()
@ 2026-03-04 10:49 Sascha Hauer
  2026-03-05  6:39 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2026-03-04 10:49 UTC (permalink / raw)
  To: Barebox List

panic() now uses vprintf() which is not available without
CONFIG_PBL_CONSOLE. Move the declaration to the right ifdeffery
which already handles that case.

Fixes: 33e3bc4782 ("pbl: fix panic() message printing")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/stdio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 945ec46926..4c0dff0c00 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -12,10 +12,8 @@
 /* stdin */
 int tstc(void);
 int getchar(void);
-int vprintf(const char *fmt, va_list args);
 #else
 static inline int tstc(void) { return 0; }
-static inline int vprintf(const char *fmt, va_list args) { return 0; }
 static inline int getchar(void) { return -EINVAL; }
 #endif
 
@@ -23,11 +21,13 @@ int readline(const char *prompt, char *buf, int len);
 
 #if (IN_PROPER && !defined(CONFIG_CONSOLE_NONE)) || \
 	(IN_PBL && defined(CONFIG_PBL_CONSOLE))
+int vprintf(const char *fmt, va_list args);
 static inline int puts(const char *s) { return console_puts(CONSOLE_STDOUT, s); }
 static inline void putchar(char c) { console_putc(CONSOLE_STDOUT, c); }
 #else
 static inline int puts(const char *s) { return 0; }
 static inline void putchar(char c) {}
+static inline int vprintf(const char *fmt, va_list args) { return 0; }
 #endif
 
 int readline(const char *prompt, char *buf, int len);
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pbl: console: fix undefined reference to vprintf()
  2026-03-04 10:49 [PATCH] pbl: console: fix undefined reference to vprintf() Sascha Hauer
@ 2026-03-05  6:39 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-03-05  6:39 UTC (permalink / raw)
  To: Barebox List, Sascha Hauer


On Wed, 04 Mar 2026 11:49:04 +0100, Sascha Hauer wrote:
> panic() now uses vprintf() which is not available without
> CONFIG_PBL_CONSOLE. Move the declaration to the right ifdeffery
> which already handles that case.
> 
> 

Applied, thanks!

[1/1] pbl: console: fix undefined reference to vprintf()
      https://git.pengutronix.de/cgit/barebox/commit/?id=510b79d1ad68 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-05  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04 10:49 [PATCH] pbl: console: fix undefined reference to vprintf() Sascha Hauer
2026-03-05  6:39 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox