Disable zpool_relabel_disk() which requires libefi until we have it.

This commit is contained in:
Brian Behlendorf 2009-07-07 15:26:39 -07:00
parent 33804ec976
commit 31157f3a90
1 changed files with 7 additions and 1 deletions

View File

@ -1767,8 +1767,9 @@ is_guid_type(zpool_handle_t *zhp, uint64_t guid, const char *type)
static int static int
zpool_relabel_disk(libzfs_handle_t *hdl, const char *name) zpool_relabel_disk(libzfs_handle_t *hdl, const char *name)
{ {
char path[MAXPATHLEN];
char errbuf[1024]; char errbuf[1024];
#ifdef HAVE_LIBEFI
char path[MAXPATHLEN];
int fd, error; int fd, error;
int (*_efi_use_whole_disk)(int); 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 (zfs_error(hdl, EZFS_NOCAP, errbuf));
} }
return (0); 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 */
} }
/* /*