HomeFreeBSD

Fix libblkid support

Description

Fix libblkid support

libblkid support is dormant because the autotools check is broken and
liblkid identifies ZFS vdevs as "zfs_member", not "zfs". We fix that
with a few changes:

First, we fix the libblkid autotools check to do a few things:

  1. Make a 64MB file, which is the minimum size ZFS permits.
  2. Make 4 fake uberblock entries to make libblkid's check succeed.
  3. Return 0 upon success to make autotools use the success case.
  4. Include stdlib.h to avoid implicit declration of free().
  5. Check for "zfs_member", not "zfs"
  6. Make --with-blkid disable autotools check (avoids Gentoo sandbox violation)
  7. Pass '-lblkid' correctly using LIBS not LDFLAGS.

Second, we change the libblkid support to scan for "zfs_member", not
"zfs".

This makes --with-blkid work on Gentoo.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1751

Details

Provenance
Richard Yao <ryao@gentoo.org>Authored on Aug 28 2013, 8:17 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 10 2013, 11:56 PM
Parents
rG65ee05acd773: Update detach section of zpool(8)
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG1db7b9be75a2: Fix libblkid support (authored by Richard Yao <ryao@gentoo.org>).Oct 10 2013, 11:56 PM