]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: enable bootbits protection
authorKarel Zak <kzak@redhat.com>
Mon, 13 Apr 2015 11:41:10 +0000 (13:41 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2015 10:35:31 +0000 (12:35 +0200)
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210428
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.c

index 38d741a7d75f50ea17f3883d2a2a7c1c00e5f2c8..874afab49b5251e89ddaa65a2a49b151124ecabd 100644 (file)
@@ -190,6 +190,7 @@ static void sfdisk_init(struct sfdisk *sf)
        if (!sf->cxt)
                err(EXIT_FAILURE, _("failed to allocate libfdisk context"));
        fdisk_set_ask(sf->cxt, ask_callback, (void *) sf);
+       fdisk_enable_bootbits_protection(sf->cxt, 1);
 
        if (sf->label_nested) {
                struct fdisk_context *x = fdisk_new_nested_context(sf->cxt,