From 433d05ff9afeb4a374943cb35d1b8b19613c8039 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 23 Oct 2013 16:59:45 +0200 Subject: libfdisk: (gpt) allow to work with hybrid GPT Notes: * fdisk don't sync hybrid MBR with GPT * hybrid MBR is ignored and not overwritten by PBMR * users is informed about expert command 'M' to toggle between MBR and GPT mode. It's possible to manually modify hybrid MBR. Signed-off-by: Karel Zak --- fdisks/fdisk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fdisks/fdisk.c') diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index ca49606a5..874f9d138 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -546,7 +546,11 @@ int main(int argc, char **argv) if (!fdisk_dev_has_disklabel(cxt)) { fdisk_info(cxt, _("Device does not contain a recognized partition table.")); fdisk_create_disklabel(cxt, NULL); - } + + } else if (fdisk_is_disklabel(cxt, GPT) && fdisk_gpt_is_hybrid(cxt)) + fdisk_warnx(cxt, _( + "The hybrid GPT detected. You have to sync " + "the hybrid MBR manually (expert command 'M').")); while (1) process_fdisk_menu(&cxt); -- cgit v1.2.3-55-g7522