diff options
author | Karel Zak | 2018-10-04 14:06:45 +0200 |
---|---|---|
committer | Karel Zak | 2018-10-04 14:06:45 +0200 |
commit | a77bd80d5a55ae2cde6bd65886f4aceae6e3822d (patch) | |
tree | d783c98bee6737607840dacb2908236e95d39482 /disk-utils | |
parent | docs: add getopt to TODO (diff) | |
download | kernel-qcow2-util-linux-a77bd80d5a55ae2cde6bd65886f4aceae6e3822d.tar.gz kernel-qcow2-util-linux-a77bd80d5a55ae2cde6bd65886f4aceae6e3822d.tar.xz kernel-qcow2-util-linux-a77bd80d5a55ae2cde6bd65886f4aceae6e3822d.zip |
sfdisk: disable --activate for Hybrid GPT/MBR
Addresses: https://github.com/karelzak/util-linux/issues/699
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/sfdisk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 21fcfa686..3911dda85 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -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) |