summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.c
diff options
context:
space:
mode:
authorKarel Zak2013-03-11 15:51:22 +0100
committerKarel Zak2013-03-11 15:56:05 +0100
commitb4fb2a61102a863be90353976c38d8096a42dc26 (patch)
treef34ee81275a25d24123658d5453c382f33725935 /fdisks/fdisk.c
parenttests: fix typo in fdisk test (diff)
downloadkernel-qcow2-util-linux-b4fb2a61102a863be90353976c38d8096a42dc26.tar.gz
kernel-qcow2-util-linux-b4fb2a61102a863be90353976c38d8096a42dc26.tar.xz
kernel-qcow2-util-linux-b4fb2a61102a863be90353976c38d8096a42dc26.zip
fdisk: (bsd) support non-nested version too
note that btrydev() should be unnecessary, regular list_table() should be enough for all types. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk.c')
-rw-r--r--fdisks/fdisk.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 87fb19161..ade91a57c 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -923,16 +923,10 @@ static void print_partition_table_from_option(struct fdisk_context *cxt,
fdisk_override_geometry(cxt, user_cylinders,
user_heads, user_sectors);
- if (!fdisk_dev_has_disklabel(cxt)) {
- /*
- * Try BSD -- TODO: move to list_table() too
- */
- list_disk_geometry(cxt);
- if (!fdisk_is_disklabel(cxt, AIX) &&
- !fdisk_is_disklabel(cxt, MAC))
- btrydev(cxt);
- } else
+ if (fdisk_dev_has_disklabel(cxt))
list_table(cxt, 0);
+ else
+ list_disk_geometry(cxt);
}
/*