summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.c
diff options
context:
space:
mode:
authorPetr Uzel2012-07-26 16:04:27 +0200
committerKarel Zak2012-07-26 17:19:03 +0200
commita7a6f7d2e27344030317e91fb656fbd7f4091b7c (patch)
tree426388d826eca85e2c678712b378343ea9e9b4dc /fdisks/fdisk.c
parentfdisk: always print total number of sectors (diff)
downloadkernel-qcow2-util-linux-a7a6f7d2e27344030317e91fb656fbd7f4091b7c.tar.gz
kernel-qcow2-util-linux-a7a6f7d2e27344030317e91fb656fbd7f4091b7c.tar.xz
kernel-qcow2-util-linux-a7a6f7d2e27344030317e91fb656fbd7f4091b7c.zip
fdisk: don't print CHS geometry unless DOS compatible mode is set
References: http://marc.info/?l=util-linux-ng&m=134329693623430&w=2 Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'fdisks/fdisk.c')
-rw-r--r--fdisks/fdisk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index fb897d856..fa202183b 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -1005,9 +1005,9 @@ list_disk_geometry(struct fdisk_context *cxt) {
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);
- printf("\n");
+ if (dos_compatible_flag)
+ printf(_("%d heads, %llu sectors/track, %llu cylinders\n"),
+ cxt->geom.heads, cxt->geom.sectors, cxt->geom.cylinders);
printf(_("Units = %s of %d * %ld = %ld bytes\n"),
str_units(PLURAL),
units_per_sector, cxt->sector_size, units_per_sector * cxt->sector_size);