[PATCH 1/1] libfdisk: allow to change an existing extended partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Butsykin <pbutsykin@xxxxxxxxxxxxx>
---
 libfdisk/src/dos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 		}
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux