summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-12-09 11:57:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-12-14 08:26:54 +0100
commit3df8dadc8efe1c65da9487f81a084447da2ebdf8 (patch)
tree06fa82aa72cc16b4a74010a2fab9b58b37313091
parentb61794d5fd1b06e91b1dcf7075fca46d2183c856 (diff)
downloadbarebox-3df8dadc8efe1c65da9487f81a084447da2ebdf8.tar.gz
barebox-3df8dadc8efe1c65da9487f81a084447da2ebdf8.tar.xz
common: add new PRINTF_FULL option
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> Link: https://lore.barebox.org/20211209105708.3517684-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/Kconfig7
-rw-r--r--lib/Kconfig3
2 files changed, 10 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 77410c958b..7386649a1a 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1505,6 +1505,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 27e7bea685..915ae7a287 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