diff options
Diffstat (limited to 'util-linux/fdisk_gpt.c')
-rw-r--r-- | util-linux/fdisk_gpt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c index f45f68af0..5786d5f7d 100644 --- a/util-linux/fdisk_gpt.c +++ b/util-linux/fdisk_gpt.c | |||
@@ -93,9 +93,7 @@ gpt_list_table(int xtra UNUSED_PARAM) | |||
93 | int i; | 93 | int i; |
94 | char numstr6[6]; | 94 | char numstr6[6]; |
95 | 95 | ||
96 | numstr6[5] = '\0'; | 96 | smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY")[0] = '\0'; |
97 | |||
98 | smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY"); | ||
99 | printf("Disk %s: %llu sectors, %s\n", disk_device, | 97 | printf("Disk %s: %llu sectors, %s\n", disk_device, |
100 | (unsigned long long)total_number_of_sectors, | 98 | (unsigned long long)total_number_of_sectors, |
101 | numstr6); | 99 | numstr6); |
@@ -113,7 +111,7 @@ gpt_list_table(int xtra UNUSED_PARAM) | |||
113 | gpt_partition *p = gpt_part(i); | 111 | gpt_partition *p = gpt_part(i); |
114 | if (p->lba_start) { | 112 | if (p->lba_start) { |
115 | smart_ulltoa5((1 + SWAP_LE64(p->lba_end) - SWAP_LE64(p->lba_start)) * sector_size, | 113 | smart_ulltoa5((1 + SWAP_LE64(p->lba_end) - SWAP_LE64(p->lba_start)) * sector_size, |
116 | numstr6, " KMGTPEZY"); | 114 | numstr6, " KMGTPEZY")[0] = '\0'; |
117 | printf("%4u %15llu %15llu %11s %04x ", | 115 | printf("%4u %15llu %15llu %11s %04x ", |
118 | i + 1, | 116 | i + 1, |
119 | (unsigned long long)SWAP_LE64(p->lba_start), | 117 | (unsigned long long)SWAP_LE64(p->lba_start), |