From 31157f3a90942b188f52bc8e41315f5028385c0b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 7 Jul 2009 15:26:39 -0700 Subject: [PATCH] Disable zpool_relabel_disk() which requires libefi until we have it. --- lib/libzfs/libzfs_pool.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 4660402f39..022594acda 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -1767,8 +1767,9 @@ is_guid_type(zpool_handle_t *zhp, uint64_t guid, const char *type) static int zpool_relabel_disk(libzfs_handle_t *hdl, const char *name) { - char path[MAXPATHLEN]; char errbuf[1024]; +#ifdef HAVE_LIBEFI + char path[MAXPATHLEN]; int fd, error; int (*_efi_use_whole_disk)(int); @@ -1797,6 +1798,11 @@ zpool_relabel_disk(libzfs_handle_t *hdl, const char *name) return (zfs_error(hdl, EZFS_NOCAP, errbuf)); } return (0); +#else + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "cannot " + "relabel '%s/%s': libefi is unsupported"), DISK_ROOT, name); + return (zfs_error(hdl, EZFS_NOTSUP, errbuf)); +#endif /* HAVE_LIBEFI */ } /*