Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/util-linux/fdisk_gpt.c

    r2725 r3621  
    9494    char numstr6[6];
    9595
    96     numstr6[5] = '\0';
    97 
    98     smart_ulltoa5(total_number_of_sectors, numstr6, " KMGTPEZY");
     96    smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY")[0] = '\0';
    9997    printf("Disk %s: %llu sectors, %s\n", disk_device,
    10098        (unsigned long long)total_number_of_sectors,
     
    109107        (unsigned long long)SWAP_LE64(gpt_hdr->last_usable_lba));
    110108
    111     printf("Number  Start (sector)    End (sector)  Size       Code  Name\n");
     109    puts("Number  Start (sector)    End (sector)  Size       Code  Name");
    112110    for (i = 0; i < n_parts; i++) {
    113111        gpt_partition *p = gpt_part(i);
    114112        if (p->lba_start) {
    115             smart_ulltoa5(1 + SWAP_LE64(p->lba_end) - SWAP_LE64(p->lba_start),
    116                 numstr6, " KMGTPEZY");
     113            smart_ulltoa5((1 + SWAP_LE64(p->lba_end) - SWAP_LE64(p->lba_start)) * sector_size,
     114                numstr6, " KMGTPEZY")[0] = '\0';
    117115            printf("%4u %15llu %15llu %11s   %04x  ",
    118116                i + 1,
     
    122120                0x0700 /* FIXME */);
    123121            gpt_print_wide(p->name, 18);
    124             printf("\n");
     122            bb_putchar('\n');
    125123        }
    126124    }
Note: See TracChangeset for help on using the changeset viewer.