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>
This commit is contained in:
parent
8d72c980f5
commit
60ba8c362d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue