From: Karel Zak Date: Tue, 6 Apr 2010 15:57:49 +0000 (+0200) Subject: libblkid: fix blkid_partlist_devno_to_partition() for extended partitions X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4720bb19c15752e5e5c2fc0dbba5b3b748afaf12;p=util-linux libblkid: fix blkid_partlist_devno_to_partition() for extended partitions Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/partitions/partitions.c b/shlibs/blkid/src/partitions/partitions.c index 0f342fc8..a5c56c88 100644 --- a/shlibs/blkid/src/partitions/partitions.c +++ b/shlibs/blkid/src/partitions/partitions.c @@ -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; }