diff options
author | Karel Zak | 2011-02-24 14:03:44 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-24 14:21:11 +0100 |
commit | 8b7eae458ccb04befb579dc87bdbfc1b6cbd5553 (patch) | |
tree | 695dbee4e53285980b460fac2852bb085bd5c0fa /shlibs/blkid/src/partitions/dos.c | |
parent | docs: update TODO (diff) | |
download | kernel-qcow2-util-linux-8b7eae458ccb04befb579dc87bdbfc1b6cbd5553.tar.gz kernel-qcow2-util-linux-8b7eae458ccb04befb579dc87bdbfc1b6cbd5553.tar.xz kernel-qcow2-util-linux-8b7eae458ccb04befb579dc87bdbfc1b6cbd5553.zip |
libblkid: try to detect if PT is newer than LVM
LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.
# pvcreate /dev/sdb
# fdisk /dev/sdb
old version:
# blkid -p -o udev /dev/sdb
ID_FS_TYPE=LVM2_member
new version:
# blkid -p -o udev /dev/sdb
ID_PART_TABLE_TYPE=dos
Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/partitions/dos.c')
-rw-r--r-- | shlibs/blkid/src/partitions/dos.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shlibs/blkid/src/partitions/dos.c b/shlibs/blkid/src/partitions/dos.c index c961ef7a9..72ac7788c 100644 --- a/shlibs/blkid/src/partitions/dos.c +++ b/shlibs/blkid/src/partitions/dos.c @@ -177,6 +177,9 @@ static int probe_dos_pt(blkid_probe pr, const struct blkid_idmag *mag) } } + blkid_probe_use_wiper(pr, BLKID_MSDOS_PT_OFFSET, + 512 - BLKID_MSDOS_PT_OFFSET); + /* * Well, all checks pass, it's MS-DOS partiton table */ |