part: Show partition numbers in hex
The 'part' command uses hex for partition numbers, so show them in hex as well, to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -54,7 +54,7 @@ static void print_one_part(dos_partition_t *p, lbaint_t ext_part_sector,
|
||||
lbaint_t lba_start = ext_part_sector + get_unaligned_le32(p->start4);
|
||||
lbaint_t lba_size = get_unaligned_le32(p->size4);
|
||||
|
||||
printf("%3d\t%-10" LBAFlength "u\t%-10" LBAFlength
|
||||
printf("%3x\t%-10" LBAFlength "u\t%-10" LBAFlength
|
||||
"u\t%08x-%02x\t%02x%s%s\n",
|
||||
part_num, lba_start, lba_size, disksig, part_num, p->sys_ind,
|
||||
(is_extended(p->sys_ind) ? " Extd" : ""),
|
||||
|
||||
@@ -240,10 +240,10 @@ static void __maybe_unused part_print_efi(struct blk_desc *desc)
|
||||
if (!is_pte_valid(&gpt_pte[i]))
|
||||
continue;
|
||||
|
||||
printf("%3d\t0x%08llx\t0x%08llx\t\"%s\"\n", (i + 1),
|
||||
le64_to_cpu(gpt_pte[i].starting_lba),
|
||||
le64_to_cpu(gpt_pte[i].ending_lba),
|
||||
print_efiname(&gpt_pte[i]));
|
||||
printf("%3x\t0x%08llx\t0x%08llx\t\"%s\"\n", (i + 1),
|
||||
le64_to_cpu(gpt_pte[i].starting_lba),
|
||||
le64_to_cpu(gpt_pte[i].ending_lba),
|
||||
print_efiname(&gpt_pte[i]));
|
||||
printf("\tattrs:\t0x%016llx\n", gpt_pte[i].attributes.raw);
|
||||
uuid = (unsigned char *)gpt_pte[i].partition_type_guid.b;
|
||||
if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))
|
||||
|
||||
@@ -222,7 +222,7 @@ static void part_print_iso(struct blk_desc *desc)
|
||||
printf("Part Start Sect x Size Type\n");
|
||||
i=1;
|
||||
do {
|
||||
printf(" %2d %8" LBAFlength "u %8" LBAFlength "u %6ld %.32s\n",
|
||||
printf(" %2x %8" LBAFlength "u %8" LBAFlength "u %6ld %.32s\n",
|
||||
i, info.start, info.size, info.blksz, info.type);
|
||||
i++;
|
||||
} while (part_get_info_iso_verb(desc, i, &info, 0) != -1);
|
||||
|
||||
Reference in New Issue
Block a user