All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmd: part: number: remove inconsistent 0x from returned value
@ 2021-03-05  7:39 Stefan Herbrechtsmeier
  2021-03-05 11:52 ` Eugeniu Rosca
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Herbrechtsmeier @ 2021-03-05  7:39 UTC (permalink / raw)
  To: u-boot

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

The part number sub-command returns the hexadecimal value with a leading
0x. This is inconsistent with other values in the command and U-Boot
uses hexadecimal values generally.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

---

 cmd/part.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/part.c b/cmd/part.c
index 3395c17b89..56e1852c66 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -152,7 +152,7 @@ static int do_part_info(int argc, char *const argv[], enum cmd_part_info param)
 		snprintf(buf, sizeof(buf), LBAF, info.size);
 		break;
 	case CMD_PART_INFO_NUMBER:
-		snprintf(buf, sizeof(buf), "0x%x", part);
+		snprintf(buf, sizeof(buf), "%x", part);
 		break;
 	default:
 		printf("** Unknown cmd_part_info value: %d\n", param);
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-12 15:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  7:39 [PATCH] cmd: part: number: remove inconsistent 0x from returned value Stefan Herbrechtsmeier
2021-03-05 11:52 ` Eugeniu Rosca
2021-03-05 14:33   ` Stefan Herbrechtsmeier
2021-03-05 14:35     ` Simon Glass
2021-03-06 20:12       ` Tom Rini
2021-03-08 10:45         ` Stefan Herbrechtsmeier
2021-03-12  4:45           ` Simon Glass
2021-03-12  6:57             ` Stefan Herbrechtsmeier
2021-03-12 15:47               ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.