[PATCH 2/3] common: add new PRINTF_FULL option

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Dec 9 02:57:07 PST 2021


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 at 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




More information about the barebox mailing list