summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.c
diff options
context:
space:
mode:
authorPetr Uzel2012-07-26 16:04:26 +0200
committerKarel Zak2012-07-26 17:18:55 +0200
commitf8527f4bd306ce4179d5f82027509770366e757b (patch)
tree81112b9cfe7ffa2caa7b141884a3198a94c93c71 /fdisks/fdisk.c
parentfdisk: fix typo (diff)
downloadkernel-qcow2-util-linux-f8527f4bd306ce4179d5f82027509770366e757b.tar.gz
kernel-qcow2-util-linux-f8527f4bd306ce4179d5f82027509770366e757b.tar.xz
kernel-qcow2-util-linux-f8527f4bd306ce4179d5f82027509770366e757b.zip
fdisk: always print total number of sectors
Print it no regardless on units_per_sector. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'fdisks/fdisk.c')
-rw-r--r--fdisks/fdisk.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 3eddfa118..fb897d856 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -997,17 +997,16 @@ list_disk_geometry(struct fdisk_context *cxt) {
long megabytes = bytes/1000000;
if (megabytes < 10000)
- printf(_("\nDisk %s: %ld MB, %lld bytes\n"),
+ printf(_("\nDisk %s: %ld MB, %lld bytes"),
cxt->dev_path, megabytes, bytes);
else {
long hectomega = (megabytes + 50) / 100;
- printf(_("\nDisk %s: %ld.%ld GB, %llu bytes\n"),
+ printf(_("\nDisk %s: %ld.%ld GB, %llu bytes"),
cxt->dev_path, hectomega / 10, hectomega % 10, bytes);
}
+ printf(_(", %llu sectors\n"), cxt->total_sectors);
printf(_("%d heads, %llu sectors/track, %llu cylinders"),
cxt->geom.heads, cxt->geom.sectors, cxt->geom.cylinders);
- if (units_per_sector == 1)
- printf(_(", total %llu sectors"), cxt->total_sectors);
printf("\n");
printf(_("Units = %s of %d * %ld = %ld bytes\n"),
str_units(PLURAL),