From: Simon Glass <simon.glass@canonical.com> Add CONFIG_CONSOLE_PUTSN option to enable the putsn() function for length-based string output. This allows printing strings without requiring nul-termination. Co-developed-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- common/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index c709df753bf..fd1f9cc5bcb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -54,6 +54,15 @@ config CONSOLE_RECORD_IN_SIZE The buffer is allocated immediately after the malloc() region is ready. +config CONSOLE_PUTSN + bool "Enable putsn() function for length-based output" + default y if SANDBOX + help + Enable the putsn() function which outputs a string with a + specified length without requiring nul-termination. This is + useful for printing substrings or binary data without + allocating temporary buffers. + config SYS_CBSIZE int "Console input buffer size" default 2048 if ARCH_TEGRA || ARCH_VERSAL || ARCH_ZYNQ || ARCH_ZYNQMP || \ -- 2.43.0