From patchwork Thu Oct 2 15:45:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 473 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=1759419979; bh=eW1X0qhfi4dYjWmfsoBk4uxYRurlp16uacoLFtCe7Tc=; 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=g7NCwEcA0sBcr327Lwd4tyKk/kqSJ8ab5pZkh1dJVyHIjWmfgwc1bVNJhoGU15s9g vVEqtCb/8PmbsRUTG+Vd4cZLHbRRaBLcrh0fMNuVo0hmdBnqss3pCL9g1awM7FKL6z MMQffOhsnjxsOyE0dPIsOPSSHzeFk/i+BDlXe/QxiQsZszCDqzbjj+1LudJ9x2/Dyq Qkh0XzgTQ8SDAJ6nqWGWIDxgApU5VC/lQ1ou38+mxL5/56Dx3inUiw5XTcP/KeYyAj a2/g7Wb+nJlD3NODRrLjs7Tq3lLtQw1hLCO+Tv1Ajxz8MVo/Jn7TB9NYnOcm9+yeLf NanU6irIHobkg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3E9FD67F15 for ; Thu, 2 Oct 2025 09:46:19 -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 A8LXy2ox5WYE for ; Thu, 2 Oct 2025 09:46:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759419979; bh=eW1X0qhfi4dYjWmfsoBk4uxYRurlp16uacoLFtCe7Tc=; 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=g7NCwEcA0sBcr327Lwd4tyKk/kqSJ8ab5pZkh1dJVyHIjWmfgwc1bVNJhoGU15s9g vVEqtCb/8PmbsRUTG+Vd4cZLHbRRaBLcrh0fMNuVo0hmdBnqss3pCL9g1awM7FKL6z MMQffOhsnjxsOyE0dPIsOPSSHzeFk/i+BDlXe/QxiQsZszCDqzbjj+1LudJ9x2/Dyq Qkh0XzgTQ8SDAJ6nqWGWIDxgApU5VC/lQ1ou38+mxL5/56Dx3inUiw5XTcP/KeYyAj a2/g7Wb+nJlD3NODRrLjs7Tq3lLtQw1hLCO+Tv1Ajxz8MVo/Jn7TB9NYnOcm9+yeLf NanU6irIHobkg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2D39267F17 for ; Thu, 2 Oct 2025 09:46:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759419977; bh=I9bzl99gg4DHohdXTH3YVn6QmBTSVn+xUj1igw9FOLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3K7CGtILzmBCN8/u6O7KL2uixn+QIFMopiL9wiE8cI+ducVqCKour2VKnvOhcqhu jrjgqh2NdNBMpY8+jeoPirlO9bKaAiM8Lhw0usZa7vbAoHzTuPglG/avmQVHfoJLtw ktB9p2nvarppMdMHQwBgJfKv1Gem/xHXl8FPXBNG3GPC9sNSxemzXge6tl9BCD9shm gh6gTvGOoP4pbZ8dEEgYAIVscRry+/BlPTlDFXqCuloQEnVjQBbliVnnTjdUJdtWRy 22UKuunTNlTSnVwfetZRv+WnO6BrWPWmhXVatduTNcvyvvEATeEyRqpo/cS08E38lj 6sES0CS7SJHtA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E677867E4D; Thu, 2 Oct 2025 09:46:17 -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 Xam3hd3N4RMA; Thu, 2 Oct 2025 09:46:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759419973; bh=E4XqfMnpqPv9cpFkNRz0HcBWHoLsXtK7APE2LXMF+p0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7K/BkKU1CsshZdDYrrIE9zvhh70pqEWbkvGrgd0JS8GtRIX/8GUtFs8LJW9/W+cq BigDSX8Okw9Be7DX1+zm/oC/i8LjJevF4UYnh1YsXdUk84YcnI/mq3+07Ch/atXzm5 yuMPsBeWtes66ySvfttWNiWf47Z//AU7nzhA7Fjuzr6mFnLcJ0UeJ8Q6BXSmqG5tnw zPHLIG68T/3PwEkyIIQOt1o6pjbZaiUlmJfuYbN/PWZn0CnN6ZbHeSdm5zxxxn7U+v y/gsNhVvaO4cQwxzKpub/RjVRJ/TGshp8XF0o8qNqnjzJlGVe0r9sDIXCod1qOnhSX ZwBJmIegySh9A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9083967D8D; Thu, 2 Oct 2025 09:46:13 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 2 Oct 2025 09:45:41 -0600 Message-ID: <20251002154554.4129220-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251002154554.4129220-1-sjg@u-boot.org> References: <20251002154554.4129220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 23FX5D6XAMSNQTXBRFPXVSPQWINMGW2W X-Message-ID-Hash: 23FX5D6XAMSNQTXBRFPXVSPQWINMGW2W 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 1/9] cmd: Update setcurs to use hex 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 Commands in U-Boot should use hex consistently. Update this command accordingly. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to switch this command to use hex cmd/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/video.c b/cmd/video.c index 91bd6de14dc..d11472c3ef6 100644 --- a/cmd/video.c +++ b/cmd/video.c @@ -22,8 +22,8 @@ static int do_video_setcursor(struct cmd_tbl *cmdtp, int flag, int argc, if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev)) return CMD_RET_FAILURE; - col = dectoul(argv[1], NULL); - row = dectoul(argv[2], NULL); + col = hextoul(argv[1], NULL); + row = hextoul(argv[2], NULL); vidconsole_position_cursor(dev, col, row); return 0; @@ -50,7 +50,7 @@ static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc, U_BOOT_CMD( setcurs, 3, 1, do_video_setcursor, "set cursor position within screen", - " in character" + " in hex characters" ); U_BOOT_CMD(