diff options
author | Richard Yao <[email protected]> | 2013-08-28 16:17:47 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-10-10 16:56:51 -0700 |
commit | 1db7b9be75a225cedb3b7a60028ca5695e5b8346 (patch) | |
tree | be7f7d6429d47ecd9afacb845b103e2c0f523252 /lib/libzfs | |
parent | 65ee05acd773beafd03bfedf96a092dd08cb2739 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1751
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index 53609f2cb..d1fa98e67 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -965,7 +965,7 @@ zpool_find_import_blkid(libzfs_handle_t *hdl, pool_list_t *pools) goto err_blkid2; } - err = blkid_dev_set_search(iter, "TYPE", "zfs"); + err = blkid_dev_set_search(iter, "TYPE", "zfs_member"); if (err != 0) { (void) zfs_error_fmt(hdl, EZFS_BADCACHE, dgettext(TEXT_DOMAIN, "blkid_dev_set_search() %d"), err); |