diff options
author | Karel Zak | 2013-05-02 11:49:28 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:46:53 +0200 |
commit | b1b1a7b7e25bc33ddebd210ec0571f9326862228 (patch) | |
tree | 504ab6deba4b998eb97468e1d7e1aef845d435fd /fdisks/fdisk.c | |
parent | libfdisk: add fdisk_context_enable_details() (diff) | |
download | kernel-qcow2-util-linux-b1b1a7b7e25bc33ddebd210ec0571f9326862228.tar.gz kernel-qcow2-util-linux-b1b1a7b7e25bc33ddebd210ec0571f9326862228.tar.xz kernel-qcow2-util-linux-b1b1a7b7e25bc33ddebd210ec0571f9326862228.zip |
fdisk: (sun) consolidate 'p'rint output
* use label operation list()
* use generic fdisk geometry output for sun
* don't duplicate geometry information
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk.c')
-rw-r--r-- | fdisks/fdisk.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 570d61def..0149d59f0 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -632,9 +632,11 @@ list_disk_geometry(struct fdisk_context *cxt) { cxt->dev_path, hectomega / 10, hectomega % 10, bytes); } printf(_(", %llu sectors\n"), cxt->total_sectors); - if (is_dos_compatible(cxt)) - printf(_("%d heads, %llu sectors/track, %llu cylinders\n"), + + if (is_dos_compatible(cxt) || fdisk_is_disklabel(cxt, SUN)) + printf(_("Geometry: %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"), fdisk_context_get_unit(cxt, PLURAL), fdisk_context_get_units_per_sector(cxt), @@ -656,11 +658,6 @@ list_disk_geometry(struct fdisk_context *cxt) { static void list_table(struct fdisk_context *cxt, int xtra) { - if (fdisk_is_disklabel(cxt, SUN)) { - sun_list_table(cxt, xtra); - return; - } - if (fdisk_is_disklabel(cxt, SGI)) { sgi_list_table(cxt, xtra); return; |