| Message ID | 20260204001002.2638622-2-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770163821; bh=BLKPUJEyRzKAppzhYJLd5bzIzOR4pcLZ/DWM9ee4rt0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=S6MuhnoUQ8FSn7aKAFiaqn9aZjIP/mugDE5y/OMpn4PowH/FbdL9CJ9MIbQkSt+Z2 2rZBItKfn/0OrIjHLLJKvU8BeFvVdVV9xaLERmb+lzCqILGxzpdwS9sSZZqL/qaGGn CcUVfatipF2o6S9iQl/eA6j1cY92kFjgR71/TFfizJiyUbmmfCdT8ykI6AAtcPTTX+ KoeDrFv/XTrYRFEVkRJ+l5G2mZ1MNQhfAWLqMxwcDDyn+IvwSBrlze9Jl7cEVH1Z2A 3H03Pn2J+0XnEiQOq5R+ZGpvXE+U2gvY3ZhFD3BMLqtUPoO3nqiwhiBeZJsAEB+Wrm ju4W2mm1aOFfg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7BD4769914 for <u-boot-concept@u-boot.org>; Tue, 3 Feb 2026 17:10:21 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6YRR2RKBETCN for <u-boot-concept@u-boot.org>; Tue, 3 Feb 2026 17:10:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770163821; bh=BLKPUJEyRzKAppzhYJLd5bzIzOR4pcLZ/DWM9ee4rt0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=S6MuhnoUQ8FSn7aKAFiaqn9aZjIP/mugDE5y/OMpn4PowH/FbdL9CJ9MIbQkSt+Z2 2rZBItKfn/0OrIjHLLJKvU8BeFvVdVV9xaLERmb+lzCqILGxzpdwS9sSZZqL/qaGGn CcUVfatipF2o6S9iQl/eA6j1cY92kFjgR71/TFfizJiyUbmmfCdT8ykI6AAtcPTTX+ KoeDrFv/XTrYRFEVkRJ+l5G2mZ1MNQhfAWLqMxwcDDyn+IvwSBrlze9Jl7cEVH1Z2A 3H03Pn2J+0XnEiQOq5R+ZGpvXE+U2gvY3ZhFD3BMLqtUPoO3nqiwhiBeZJsAEB+Wrm ju4W2mm1aOFfg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6BED869911 for <u-boot-concept@u-boot.org>; Tue, 3 Feb 2026 17:10:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770163820; bh=4in2X8C2YIsTjXNRRbyH3mZtsLAhHCsIi3oe4naUhnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=isffnfIS3itTI42S6ZmrcitCT5DtWmmixGolHERYmauI8rFwznLQEZrhFkPCdnsus cMedNuOgwywEaVnf2+xGlS/aOMg3bYGR7/1fI9edu2HHKxJ1qJ3l+OGaxBfMAJXF3S dj/Wchklh0KaGcQhez2dXiGwoqTgG405rwAsvgrie7ANp02eDieOs/lZmmigTStpxd 6ZHdaKWlYzZny9FhbQ3CPB5r6QJ2UN3DxMC1xk8yMclelotzjBs8Y0dGWq5E2KB/zF g7LxV2qGBTSRRQ5nJCGtZdPQiP1xFGorDhyo6HsQwvV9DSaAsSSaADXgg01gso1T97 sFHmzxsRQv5Cw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 64B2469868; Tue, 3 Feb 2026 17:10:20 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id KD4_oJAYSOvb; Tue, 3 Feb 2026 17:10:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1770163816; bh=oB20OPc7EeBhApQPUmjQTZAzxOWQ2FwsbySJt9OAkos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ry27vshvCz+ADCSIRohaHoPggVh+aLMlj/dOu7vxXz9SKqO5fio0nkOFjnZ9HvOez dmln5aHgaAtUSasv6JyWm+68KZ3c+EEm8x/KE0iXWSWv27G2ps/PJxcoT5LpHOyYw0 f1fNtROWB6KVTLmKSWiIupaLT43NLC16uB4xy4KSU+Q/GglPUpzqK2ZBoPLBrpvQt0 rO67t98WBo9rFcp4BQxnZV6lMrAIRP0BlpbRRlkFQNQbYaE7Nah8dMH6CepvhfKV53 1siKuK1W5gsJImWA5I/8TDkhGcl0Z3syRFzWZGb61NU8pkWz5y1f333GR6C6uplRVz /ELO7vmzAKTYQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 134A869909; Tue, 3 Feb 2026 17:10:16 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 3 Feb 2026 17:09:45 -0700 Message-ID: <20260204001002.2638622-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260204001002.2638622-1-sjg@u-boot.org> References: <20260204001002.2638622-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QJDBY5QBIMKSL7YG3J544QBKHXYF7ASI X-Message-ID-Hash: QJDBY5QBIMKSL7YG3J544QBKHXYF7ASI X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <simon.glass@canonical.com>, "Claude Sonnet 4 . 5" <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/13] console: Add a Kconfig option for putsn() support List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/QJDBY5QBIMKSL7YG3J544QBKHXYF7ASI/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Add putsn() for length-based console output
|
|
Commit Message
Simon Glass
Feb. 4, 2026, 12:09 a.m. UTC
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 || \