From patchwork Fri Aug 22 14:21:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 109 Return-Path: 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=1755872546; bh=h0Zgbbd/J6tKYDr+JrwKQ9hP9uTntceleeCMFMq2f3o=; 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=NLUnopqFQne1MpOZgPdsyKYkpRZd6TAeoDOOVT+Rp215qxzgDIQzGIHOlbJbPyAte +vF6LsPQ0VarkLiIcMyAI0py9gqNAbTs22+zB9iGi3+s8pNyCAGWM7zK1Q49mSJJd7 xZkr5IynolrLOtsaTszzljzNEtKyVPwIkKgEYBEsJnoJVPAHLVNxeB0WQyKw6T/EIs d6scI/OinXNsEIGu2+iqMWJEzKMZkgaj5meZWs6oIrfMBLi8hPYmNR//cmqOkelC84 SFPFfcxltCPuRLGEsWszFpeMqxPOjiQg89Oht6Db74+HVU2Hm9Q9FBgvUlEPNrAlie 2nlItzRhDXESA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CD99B6770C for ; Fri, 22 Aug 2025 08:22:26 -0600 (MDT) 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 DcKEdDLmC021 for ; Fri, 22 Aug 2025 08:22:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755872546; bh=h0Zgbbd/J6tKYDr+JrwKQ9hP9uTntceleeCMFMq2f3o=; 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=NLUnopqFQne1MpOZgPdsyKYkpRZd6TAeoDOOVT+Rp215qxzgDIQzGIHOlbJbPyAte +vF6LsPQ0VarkLiIcMyAI0py9gqNAbTs22+zB9iGi3+s8pNyCAGWM7zK1Q49mSJJd7 xZkr5IynolrLOtsaTszzljzNEtKyVPwIkKgEYBEsJnoJVPAHLVNxeB0WQyKw6T/EIs d6scI/OinXNsEIGu2+iqMWJEzKMZkgaj5meZWs6oIrfMBLi8hPYmNR//cmqOkelC84 SFPFfcxltCPuRLGEsWszFpeMqxPOjiQg89Oht6Db74+HVU2Hm9Q9FBgvUlEPNrAlie 2nlItzRhDXESA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2F5B06770E for ; Fri, 22 Aug 2025 08:22:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755872544; bh=9b0siq+1lmLYBfFer8QQKzu11a1cNXr+gHtFa74Q9eQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQpn6YXE0fkka64QhQfaLAwAwWEftqkj+DejkWBbbiOC77LMzVSmZjcAoSPaGJ2BN znEBlX7mQyLR3Lo0K2F6NCF7Io2gaL+i0EG2qQUayz9acI0ZzcVt60cz/4pfMmOWaz 0wQKJX+c5IBmgKNxtqwZcPH03IconLZrzHJaNhiUb2K3wKuvxXOdx6cwBNffpxxed+ Ojkr72bEjPr9Qu5p0OuTz2rZKvcM91VTUBI9hfO4xvHFVhzOhvoKbe+k4+v0HZmplt PrAcwl+4YqwTveYA1tVMdWhaSsd6kDT0UAzF3AS0mw3ecgGmsflbqOdpNe1ouN340h RusDYxZ3fvfZw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 304AD6770C; Fri, 22 Aug 2025 08:22:24 -0600 (MDT) 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 3iYV7Aq9e38i; Fri, 22 Aug 2025 08:22:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755872543; bh=z7NYc+Xvx9e+8+BXrf1hRdPONZ9BOfsFJ+cMQXJygNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRiMqvIyOmELL4cn0STPFWtWwZSs+zR/uiIDJtxadpxNhaF804KJnDD/FagVKsxxL HzvWc4gfp7Juo73Z/ngqd98DcJrNltXlsljBEDWM0qO48n7bj4UtPvGCebt6MHwsA3 upfkwnESYQbb/Up/UJXI8VMs9kyzdsNmUCKw4V/zCYVKyUfY3sHCf0liMMgUWey16M ofOfYjhEyb6JHD9+oiKX6xLEuAtAXvpLJpAH9OWAm3Ua342NPrdOYh+ovbvOF73LKw wPIxnK8iLJlw3MzpY2MhdrbRv5p4r3mjulUXMmDpUCLLmXU3L2TX25uVOmgdtyhbDi 4Xuz21UFH3m2A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A4E5C676BE; Fri, 22 Aug 2025 08:22:23 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 22 Aug 2025 08:21:35 -0600 Message-ID: <20250822142153.3404275-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250822142153.3404275-1-sjg@u-boot.org> References: <20250822142153.3404275-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ZVBFWUDW2KJYJMKJYIFVL7PHSM3YXMMH X-Message-ID-Hash: ZVBFWUDW2KJYJMKJYIFVL7PHSM3YXMMH 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 , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/16] console: Rename console-put functions to prepare for pager List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Rename console_puts() to console_puts_pager() and console_putc() to console_putc_pager() to prepare for implementing a console-pager feature. All normal output goes through the pager. Co-developed-by: Claude Signed-off-by: Simon Glass --- common/console.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/console.c b/common/console.c index c6dfed6e201..fdccf156b5a 100644 --- a/common/console.c +++ b/common/console.c @@ -321,7 +321,7 @@ static int console_tstc(int file) return 0; } -static void console_putc(int file, const char c) +static void console_putc_pager(int file, const char c) { int i; struct stdio_dev *dev; @@ -377,7 +377,7 @@ int console_printf_select_stderr(bool serial_only, const char *fmt, ...) return ret; } -static void console_puts(int file, const char *s) +static void console_puts_pager(int file, const char *s) { int i; struct stdio_dev *dev; @@ -433,7 +433,7 @@ static inline int console_tstc(int file) return stdio_devices[file]->tstc(stdio_devices[file]); } -static inline void console_putc(int file, const char c) +static inline void console_putc_pager(int file, const char c) { stdio_devices[file]->putc(stdio_devices[file], c); } @@ -445,7 +445,7 @@ void console_puts_select(int file, bool serial_only, const char *s) stdio_devices[file]->puts(stdio_devices[file], s); } -static inline void console_puts(int file, const char *s) +static inline void console_puts_pager(int file, const char *s) { stdio_devices[file]->puts(stdio_devices[file], s); } @@ -562,13 +562,13 @@ int ftstc(int file) void fputc(int file, const char c) { if ((unsigned int)file < MAX_FILES) - console_putc(file, c); + console_putc_pager(file, c); } void fputs(int file, const char *s) { if ((unsigned int)file < MAX_FILES) - console_puts(file, s); + console_puts_pager(file, s); } #ifdef CONFIG_CONSOLE_FLUSH_SUPPORT