]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (dos) fix free part counter
authorKarel Zak <kzak@redhat.com>
Wed, 27 Nov 2013 20:42:18 +0000 (21:42 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 27 Nov 2013 20:42:18 +0000 (21:42 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index 92dc3b9952c4c8513ff70dacfe422c910798c773..7e2374df915de6d3d64767f0485c054321bdb08e 100644 (file)
@@ -1252,7 +1252,7 @@ static int dos_add_partition(
 
        for (i = 0; i < 4; i++) {
                struct dos_partition *p = self_partition(cxt, i);
-               free_primary += is_used_partition(p);
+               free_primary += !is_used_partition(p);
        }
 
        if (!free_primary && cxt->label->nparts_max >= MAXIMUM_PARTS) {