diff options
author | Pavel Butsykin | 2017-04-18 17:59:18 +0200 |
---|---|---|
committer | Karel Zak | 2017-04-19 10:25:39 +0200 |
commit | e6b4209d954a6d34b2544e4dde29074a69b477e1 (patch) | |
tree | 8f64d185fdc695d8b7f63a6e907c64289df306a2 /libfdisk/src/dos.c | |
parent | tests: update script(1) tests (diff) | |
download | kernel-qcow2-util-linux-e6b4209d954a6d34b2544e4dde29074a69b477e1.tar.gz kernel-qcow2-util-linux-e6b4209d954a6d34b2544e4dde29074a69b477e1.tar.xz kernel-qcow2-util-linux-e6b4209d954a6d34b2544e4dde29074a69b477e1.zip |
libfdisk: allow to change an existing extended partition
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Diffstat (limited to 'libfdisk/src/dos.c')
-rw-r--r-- | libfdisk/src/dos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 39e42e3e6..8f54f7369 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; } |