mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/3] common: add new PRINTF_FULL option
Date: Thu,  9 Dec 2021 11:57:07 +0100	[thread overview]
Message-ID: <20211209105708.3517684-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20211209105708.3517684-1-a.fatoum@pengutronix.de>

We now got three compile-time selectable printf format specifiers. For
debugging, it can be useful to enable all of them, thus add a new
PRINTF_FULL option.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/Kconfig | 7 +++++++
 lib/Kconfig    | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index e540cba7ebaa..814b820e2a54 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1512,6 +1512,13 @@ config PBL_BREAK
 	  If enabled, barebox will be compiled with BKPT instruction
 	  on early pbl init. This option should be used only with JTAG debugger!
 
+config PRINTF_FULL
+	bool "Support all extended printf format specifiers"
+	help
+	  Adds support for lesser used format specifiers like UUIDs and
+	  hex strings. Code requiring them should select it directly,
+	  so this is mainly for debugging. If unsure, say no.
+
 source "lib/Kconfig.ubsan"
 source "lib/kasan/Kconfig"
 
diff --git a/lib/Kconfig b/lib/Kconfig
index 27e7bea6852f..915ae7a28755 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -162,12 +162,15 @@ config PROGRESS_NOTIFIER
 
 config PRINTF_UUID
 	bool
+	default y if PRINTF_FULL
 
 config PRINTF_WCHAR
 	bool
+	default y if PRINTF_FULL
 
 config PRINTF_HEXSTR
 	bool
+	default y if PRINTF_FULL
 
 config GENERIC_LIB_ASHLDI3
 	bool
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-12-09 10:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 10:57 [PATCH 1/3] vsprintf: add support for printing raw buffers as hex (%*ph) Ahmad Fatoum
2021-12-09 10:57 ` Ahmad Fatoum [this message]
2021-12-09 10:57 ` [PATCH 3/3] of: implement new of_property_sprintf Ahmad Fatoum
2021-12-15 20:16   ` [PATCH] fixup! " Ahmad Fatoum
2021-12-13 22:28 ` [PATCH 1/3] vsprintf: add support for printing raw buffers as hex (%*ph) Sascha Hauer
2021-12-14  6:57   ` Ahmad Fatoum
2021-12-14  7:27     ` Sascha Hauer
2022-01-03 10:40       ` Ahmad Fatoum

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=20211209105708.3517684-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@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