From 50f7514e9dd4d87201f6db5629cf9b6cffddf5eb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Oct 2014 15:32:09 +0200 Subject: [PATCH] libfdisk: (dos) fix booable flag usage Signed-off-by: Karel Zak --- libfdisk/src/dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, -- 2.47.2