diff options
author | Karel Zak | 2013-03-05 13:40:32 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-11 13:00:57 +0100 |
commit | 5c72641a5e948e03d6a9b9bb9fcea65fdf6d956e (patch) | |
tree | 969f21c61d2ff1bf5ccabecb3bc1e7b71f0e3f8e /libblkid | |
parent | fdisk: (dos) use new dialog to ask for prim. partitions (diff) | |
download | kernel-qcow2-util-linux-5c72641a5e948e03d6a9b9bb9fcea65fdf6d956e.tar.gz kernel-qcow2-util-linux-5c72641a5e948e03d6a9b9bb9fcea65fdf6d956e.tar.xz kernel-qcow2-util-linux-5c72641a5e948e03d6a9b9bb9fcea65fdf6d956e.zip |
libblkid: ignore nested BSD partitions if same like parent
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r-- | libblkid/src/partitions/bsd.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 " |