summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/dos.c
diff options
context:
space:
mode:
authorKarel Zak2014-10-07 15:32:09 +0200
committerKarel Zak2014-10-07 15:32:09 +0200
commit50f7514e9dd4d87201f6db5629cf9b6cffddf5eb (patch)
tree0fe48abdd1f5a6f8fb0f538ea309988534877cc9 /libfdisk/src/dos.c
parentsfdisk: add --label-nested for hybrid GPT (diff)
downloadkernel-qcow2-util-linux-50f7514e9dd4d87201f6db5629cf9b6cffddf5eb.tar.gz
kernel-qcow2-util-linux-50f7514e9dd4d87201f6db5629cf9b6cffddf5eb.tar.xz
kernel-qcow2-util-linux-50f7514e9dd4d87201f6db5629cf9b6cffddf5eb.zip
libfdisk: (dos) fix booable flag usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/dos.c')
-rw-r--r--libfdisk/src/dos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 3e940c693..b1c9db9c5 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,