From: Karel Zak Date: Tue, 7 Oct 2014 13:32:09 +0000 (+0200) Subject: libfdisk: (dos) fix booable flag usage X-Git-Tag: v2.26-rc1~342 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50f7514e9dd4d87201f6db5629cf9b6cffddf5eb;p=thirdparty%2Futil-linux.git libfdisk: (dos) fix booable flag usage Signed-off-by: Karel Zak --- diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 3e940c693c..b1c9db9c5b 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -836,7 +836,7 @@ static void set_partition(struct fdisk_context *cxt, (size_t) (stop - start + 1), sysid)); - p->boot_ind = boot ? 1 : 0; + p->boot_ind = boot ? ACTIVE_FLAG : 0; p->sys_ind = sysid; dos_partition_set_start(p, start - offset); dos_partition_set_size(p, stop - start + 1); @@ -1128,7 +1128,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n, } } - set_partition(cxt, n, 0, start, stop, sys, pa ? pa->boot : 0); + set_partition(cxt, n, 0, start, stop, sys, pa && pa->boot ? 1 : 0); if (n > 4) { struct pte *pe = self_pte(cxt, n); set_partition(cxt, n - 1, 1, pe->offset, stop,