[PATCH 4/5] fdisk: don't print CHS geometry unless DOS compatible mode is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



References: http://marc.info/?l=util-linux-ng&m=134329693623430&w=2

Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>
---
 fdisks/fdisk.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index fb897d8..fa20218 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);
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux