]> err.no Git - util-linux/commitdiff
libblkid: fix blkid_partlist_devno_to_partition() for extended partitions
authorKarel Zak <kzak@redhat.com>
Tue, 6 Apr 2010 15:57:49 +0000 (17:57 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 6 Apr 2010 15:57:49 +0000 (17:57 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/partitions.c

index 0f342fc87b724dd4b7ed0de85500a9822331465e..a5c56c8898505bc5121bb3f6611ac178206836b0 100644 (file)
@@ -839,6 +839,12 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
                if (blkid_partition_get_start(par) == start &&
                    blkid_partition_get_size(par) == size)
                        return par;
+
+               /* exception for extended dos partitions */
+               if (blkid_partition_get_start(par) == start &&
+                   blkid_partition_is_extended(par) && size <= 1024)
+                       return par;
+
        }
        return NULL;
 }