]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: don't print CHS geometry unless DOS compatible mode is set
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 26 Jul 2012 14:04:27 +0000 (16:04 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 15:19:03 +0000 (17:19 +0200)
References: http://marc.info/?l=util-linux-ng&m=134329693623430&w=2
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
fdisks/fdisk.c

index fb897d856713696a0ecb5a738e95c4e5b9a08b1a..fa202183bec443223972741a04c200923bf45b51 100644 (file)
@@ -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);