]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: fix return codes from PART_ENTRY_* probing
authorKarel Zak <kzak@redhat.com>
Tue, 15 Apr 2014 11:09:20 +0000 (13:09 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Apr 2014 11:09:20 +0000 (13:09 +0200)
commita61618987ab2d7bb5e1954871dc574dbee89a92b
tree9734ffdc2d88b47248802c25f5532af2ffba0d2b
parentae0abae2835af6b5532ee7e48d5fd8a4792c4b1a
libblkid: fix return codes from PART_ENTRY_* probing

The partitions prober does two step:

1) probe the assigned device for partition table

2) probe whole-disk device for partition table if the assigned device is a
   partition (this generates PART_ENTRY_* results for blkid -p -o udev))

The step 2) is optional and the return code from this probing should
not override success (rc=0) from the step 1) -- except situations when
the step 2) ends with I/O error or when the step 1) found nothing, but
2) was successful.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/partitions/partitions.c