libblkid: improve ZFS detection and add LABEL and UUID extraction
Improve ZFS uberblock detection to loop over multiple uberblocks,
and detect at least 4 magic values, to avoid random collisions.
It doesn't yet probe the VDEV LABEL at the end of the device, though
it wouldn't be too hard to add it at this point if needed.
Add extraction of the pool name (as LABEL), the VDEV (block device)
guid as UUID_SUB, and pool_guid (volume) as UUID from the nvlist in
the VDEV LABEL. Do simple sanity checking on the nvlist data values
to avoid overflowing the buffer if they are corrupt in any way.
[kzak@redhat.com: - use %PRIu64 instead %llu]
Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Karel Zak <kzak@redhat.com>