[PATCH] cmd: part: number: remove inconsistent 0x from returned value

Stefan Herbrechtsmeier stefan.herbrechtsmeier-oss at weidmueller.com
Fri Mar 5 08:39:04 CET 2021


From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at 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 at 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



More information about the U-Boot mailing list