aboutsummaryrefslogtreecommitdiffstats
path: root/disk-utils/cfdisk.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2019-02-12 14:21:54 +0100
committerKarel Zak <kzak@redhat.com>2019-02-12 14:21:54 +0100
commit39f37044b3146f222cda182494abd4ddb5217335 (patch)
tree472f506af3a8c37bfd531a24b2da55025a7217bd /disk-utils/cfdisk.c
parent07b94c9f327c0b3230022b55f8105249f205a739 (diff)
downloadutil-linux-39f37044b3146f222cda182494abd4ddb5217335.tar.gz
fdisk: use 2 decimal places for size in disk summary
In the disk summary it seems nice, but I'm not sure about lists (SIZE columns). It seems more readable to keep the lists with one decimal place only. New output: # sfdisk --list /dev/sda Old output: Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors New output: Disk /dev/sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors The rest is unchanged: ... Device Start End Sectors Size Type /dev/sda1 2048 411647 409600 200M EFI System /dev/sda2 411648 821247 409600 200M Linux filesystem /dev/sda3 821248 274087935 273266688 130.3G Linux filesystem /dev/sda4 274087936 378945535 104857600 50G Linux filesystem /dev/sda5 378945536 468862094 89916559 42.9G Linux filesystem Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1673452 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/cfdisk.c')
-rw-r--r--disk-utils/cfdisk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index 25f8e1a9e8..ff1bc44c1d 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -1699,7 +1699,8 @@ static int ui_refresh(struct cfdisk *cf)
if (!ui_enabled)
return -EINVAL;
- strsz = size_to_human_string(SIZE_SUFFIX_SPACE
+ strsz = size_to_human_string(SIZE_DECIMAL_2DIGITS
+ | SIZE_SUFFIX_SPACE
| SIZE_SUFFIX_3LETTER, bytes);
lb = fdisk_get_label(cf->cxt, NULL);