From 5c72641a5e948e03d6a9b9bb9fcea65fdf6d956e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 5 Mar 2013 13:40:32 +0100 Subject: libblkid: ignore nested BSD partitions if same like parent Signed-off-by: Karel Zak --- libblkid/src/partitions/bsd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libblkid/src') diff --git a/libblkid/src/partitions/bsd.c b/libblkid/src/partitions/bsd.c index ee15ad2fe..c39c78aa4 100644 --- a/libblkid/src/partitions/bsd.c +++ b/libblkid/src/partitions/bsd.c @@ -174,6 +174,13 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag) start = le32_to_cpu(p->p_offset); size = le32_to_cpu(p->p_size); + if (parent && blkid_partition_get_start(parent) == start + && blkid_partition_get_size(parent) == size) { + DBG(DEBUG_LOWPROBE, printf( + "WARNING: BSD partition (%d) same like parent, " + "ignore\n", i)); + continue; + } if (parent && !blkid_is_nested_dimension(parent, start, size)) { DBG(DEBUG_LOWPROBE, printf( "WARNING: BSD partition (%d) overflow " -- cgit v1.2.3-55-g7522