From 4720bb19c15752e5e5c2fc0dbba5b3b748afaf12 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 6 Apr 2010 17:57:49 +0200 Subject: [PATCH] libblkid: fix blkid_partlist_devno_to_partition() for extended partitions Signed-off-by: Karel Zak --- shlibs/blkid/src/partitions/partitions.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.39.5