From: Petr Uzel Date: Thu, 26 Jul 2012 14:04:27 +0000 (+0200) Subject: fdisk: don't print CHS geometry unless DOS compatible mode is set X-Git-Tag: v2.22-rc1~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7a6f7d2e27344030317e91fb656fbd7f4091b7c;p=thirdparty%2Futil-linux.git 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 --- diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index fb897d8567..fa202183be 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);