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);
}
/*
return 1;
}
-int
-btrydev (struct fdisk_context *cxt)
-{
- if (xbsd_readlabel (cxt, NULL, &xbsd_dlabel) == 0)
- return -1;
- printf(_("\nBSD label for device: %s\n"), cxt->dev_path);
- xbsd_print_disklabel (cxt, 0);
- return 0;
-}
-
#if !defined (__alpha__)
static int hidden(int type)
{
int i;
struct partition *p;
+ if (!cxt->parent)
+ return; /* not nested PT */
+
if (fdisk_ask_partnum(cxt->parent, &k, FALSE))
return;
cxt->labels[ cxt->nlabels++ ] = fdisk_new_gpt_label(cxt);
cxt->labels[ cxt->nlabels++ ] = fdisk_new_dos_label(cxt);
cxt->labels[ cxt->nlabels++ ] = fdisk_new_aix_label(cxt);
+ cxt->labels[ cxt->nlabels++ ] = fdisk_new_bsd_label(cxt);
cxt->labels[ cxt->nlabels++ ] = fdisk_new_mac_label(cxt);
cxt->labels[ cxt->nlabels++ ] = fdisk_new_sgi_label(cxt);
cxt->labels[ cxt->nlabels++ ] = fdisk_new_sun_label(cxt);