cmd: part: number: return hexadecimal value
PATCH 1/1 cmd: part: number: return hexadecimal value
From: Roman Stratiienko <[email protected]>
At this point we are using part number sub-command to retrieve UUID of the partition using it's name.
e.g.:
part number mmc $mmcdev system_a system_a_index part uuid mmc $mmcdev:${system_a_index} system_a_uuid
Since 'part uuid' sub-command expects partition index in hex format and 'part number' returns decimal value, 'part uuid' command will provide wrong UUID or fail.
--- cmd/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/part.c +1 -1
@@ -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),"%d" , part); +snprintf (buf,sizeof (buf),"0x%x" , part);break ;default :printf ("** Unknown cmd_part_info value: %d\n" , param);
Signature · 1 line
2.23.0
PATCH 1/1 cmd: part: number: return hexadecimal value
Quoted 13 lines · Eugeniu Rosca
From: Roman Stratiienko <[email protected]>
At this point we are using part number sub-command to retrieve UUID of the partition using it's name.
e.g.:
part number mmc $mmcdevsystem_asystem_a_indexpart uuid mmc $mmcdev:${system_a_index}system_a_uuidSince 'part uuid' sub-command expects partition index in hex format and 'part number' returns decimal value, 'part uuid' command will provide wrong UUID or fail.
Quoted 5 lines
Fixes be683756f62034 ("cmd: part: Add 'number' sub-command")Cc Dirk Behme <[email protected]>Reported-by Pontus Fuchs <[email protected]>Signed-off-by Roman Stratiienko <[email protected]>Signed-off-by Eugeniu Rosca <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190920/ebbbc35b/attachment.sig>
PATCH 1/1 cmd: part: number: return hexadecimal value
In reply to Eugeniu RoscaQuoted 37 lines · Eugeniu Rosca
From: Roman Stratiienko <[email protected]>
At this point we are using part number sub-command to retrieve UUID of the partition using it's name.
e.g.:
part number mmc $mmcdevsystem_asystem_a_indexpart uuid mmc $mmcdev:${system_a_index}system_a_uuidSince 'part uuid' sub-command expects partition index in hex format and 'part number' returns decimal value, 'part uuid' command will provide wrong UUID or fail.
Fixes be683756f62034 ("cmd: part: Add 'number' sub-command")Cc Dirk Behme <[email protected]>Reported-by Pontus Fuchs <[email protected]>Signed-off-by Roman Stratiienko <[email protected]>Signed-off-by Eugeniu Rosca <[email protected]>--- cmd/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/part.c +1
-2@@ -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),"%d" , part); +snprintf (buf,sizeof (buf),"0x%x" , part);break ;default :printf ("** Unknown cmd_part_info value: %d\n" , param); --
Quoted 2 lines
2.23.0
Signature · 8 lines
Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk mailto: igor.opaniuk at gmail.com skype: igor.opanyuk +380 (93) 836 40 67 http://ua.linkedin.com/in/iopaniuk
PATCH 1/1 cmd: part: number: return hexadecimal value
On Fri, Sep 20, 2019 at 10:21:29AM -0400, Tom Rini wrote:
[..]
Quoted 1 line
Reviewed-by Tom Rini <[email protected]>
On Tue, Sep 24, 2019 at 09:24:57AM +0300, Igor Opaniuk wrote:
[..]
Quoted 1 line
Reviewed-by Igor Opaniuk <[email protected]>
Thank you for the swift reviews!
Signature · 2 lines
Best Regards, Eugeniu
PATCH 1/1 cmd: part: number: return hexadecimal value
In reply to Eugeniu RoscaQuoted 13 lines · Eugeniu Rosca
From: Roman Stratiienko <[email protected]>
At this point we are using part number sub-command to retrieve UUID of the partition using it's name.
e.g.:
part number mmc $mmcdevsystem_asystem_a_indexpart uuid mmc $mmcdev:${system_a_index}system_a_uuidSince 'part uuid' sub-command expects partition index in hex format and 'part number' returns decimal value, 'part uuid' command will provide wrong UUID or fail.
Quoted 7 lines
Fixes be683756f62034 ("cmd: part: Add 'number' sub-command")Cc Dirk Behme <[email protected]>Reported-by Pontus Fuchs <[email protected]>Signed-off-by Roman Stratiienko <[email protected]>Signed-off-by Eugeniu Rosca <[email protected]>Reviewed-by Tom Rini <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191005/5d673cf6/attachment.sig>