summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2014-10-07 11:33:46 +0200
committerKarel Zak2014-10-07 11:33:46 +0200
commit60ba8c362d93815f4b1cdc3ad9cebda3e11677f7 (patch)
tree717d1d0484580ba71beb799dc353a797e823540d
parentdocs: add swapon -o to TODO file (diff)
downloadkernel-qcow2-util-linux-60ba8c362d93815f4b1cdc3ad9cebda3e11677f7.tar.gz
kernel-qcow2-util-linux-60ba8c362d93815f4b1cdc3ad9cebda3e11677f7.tar.xz
kernel-qcow2-util-linux-60ba8c362d93815f4b1cdc3ad9cebda3e11677f7.zip
libfdisk: fix add_logical() assert
The zero index is absolutely valid for extended partition (it means extended partition could be the first partition on the device). Reported-by: Christoph Hoopmann <christophhoopmann@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--libfdisk/src/dos.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 15ea6642f..3cc156eee 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -1158,7 +1158,6 @@ static int add_logical(struct fdisk_context *cxt, struct fdisk_partition *pa)
assert(cxt);
assert(cxt->label);
assert(self_label(cxt)->ext_offset);
- assert(self_label(cxt)->ext_index);
DBG(LABEL, ul_debug("DOS: nparts max: %zu", cxt->label->nparts_max));
pe = self_pte(cxt, cxt->label->nparts_max);