From: Pavel Butsykin Date: Tue, 18 Apr 2017 15:59:18 +0000 (+0300) Subject: libfdisk: allow to change an existing extended partition X-Git-Tag: v2.30-rc1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6b4209d954a6d34b2544e4dde29074a69b477e1;p=thirdparty%2Futil-linux.git libfdisk: allow to change an existing extended partition Signed-off-by: Pavel Butsykin --- diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 39e42e3e6c..8f54f7369e 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -2025,7 +2025,7 @@ static int dos_set_partition(struct fdisk_context *cxt, size_t n, orgtype = p->sys_ind; if (pa->type) { - if (IS_EXTENDED(pa->type->code) && l->ext_offset) { + if (IS_EXTENDED(pa->type->code) && l->ext_offset && l->ext_index != n) { fdisk_warnx(cxt, _("Extended partition already exists.")); return -EINVAL; }