Commit a77bd80d authored by Karel Zak's avatar Karel Zak

sfdisk: disable --activate for Hybrid GPT/MBR

Addresses: https://github.com/karelzak/util-linux/issues/699Signed-off-by: 's avatarKarel Zak <kzak@redhat.com>
parent b4601f62
......@@ -824,6 +824,9 @@ static int command_activate(struct sfdisk *sf, int argc, char **argv)
err(EXIT_FAILURE, _("cannot open %s"), devname);
if (fdisk_is_label(sf->cxt, GPT)) {
if (fdisk_gpt_is_hybrid(sf->cxt))
errx(EXIT_FAILURE, _("toggle boot flags is unsupported for Hybrid GPT/MBR"));
/* Switch from GPT to PMBR */
sf->cxt = fdisk_new_nested_context(sf->cxt, "dos");
if (!sf->cxt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment