[Concept,v2,1/9] cmd: Update setcurs to use hex

Message ID 20251002154554.4129220-2-sjg@u-boot.org
State New
Headers
Series video: Tidy up embedded graphical images |

Commit Message

Simon Glass Oct. 2, 2025, 3:45 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Commands in U-Boot should use hex consistently. Update this command
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add new patch to switch this command to use hex

 cmd/video.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

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",
-	"    <col> <row> in character"
+	"    <col> <row> in hex characters"
 );
 
 U_BOOT_CMD(