]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: make blkid_new_probe_from_filename() usable on whole-disk
authorKarel Zak <kzak@redhat.com>
Wed, 6 Feb 2013 16:26:46 +0000 (17:26 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Feb 2013 16:39:28 +0000 (17:39 +0100)
commit6e650f8895631dabc5b8bb809bed024896c3dcc5
treeedffd946a10714e4e3db65841ade067ad1928817
parentdb663995bd93e170a43b1a7050c7a738782dabfb
libblkid: make blkid_new_probe_from_filename() usable on whole-disk

This is stupid bug, when libblkid probe for partition table on
whole-disk device with old 0.90 Linux RAID then it creates clone of
the struct blkid_probe to avoid collisions with the original probing
setting.

If the cloned prober is unnecessary then it's deallocated by
blkid_free_probe() ... and this function also closes the file
descriptor if the device has been opened by blkid_new_probe_from_filename().

Fortunately we usually use open() + blkid_probe_set_device(), ...
except wipefs(1).

Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c