diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index f953889c8c..f2270a3f7a 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -363,7 +363,6 @@ check_file(const char *file, boolean_t force, boolean_t isspare) static boolean_t is_whole_disk(const char *arg) { -#ifdef HAVE_LIBEFI struct dk_gpt *label; int fd; char path[MAXPATHLEN]; @@ -379,9 +378,6 @@ is_whole_disk(const char *arg) efi_free(label); (void) close(fd); return (B_TRUE); -#else - return (B_FALSE); -#endif } /* @@ -891,7 +887,6 @@ check_replication(nvlist_t *config, nvlist_t *newroot) static int make_disks(zpool_handle_t *zhp, nvlist_t *nv) { -#ifdef HAVE_LIBEFI nvlist_t **child; uint_t c, children; char *type, *path, *diskname; @@ -979,7 +974,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv) for (c = 0; c < children; c++) if ((ret = make_disks(zhp, child[c])) != 0) return (ret); -#endif + return (0); } diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index a3b3daf15c..bae4a62d23 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -47,11 +47,8 @@ #include "zfs_namecheck.h" #include "zfs_prop.h" #include "libzfs_impl.h" -#include "zfs_config.h" -#ifdef HAVE_LIBEFI static int read_efi_label(nvlist_t *config, diskaddr_t *sb); -#endif #if defined(__i386) || defined(__amd64) #define BOOTCMD "installgrub(1M)" @@ -342,7 +339,6 @@ bootfs_name_valid(const char *pool, char *bootfs) static boolean_t pool_uses_efi(nvlist_t *config) { -#ifdef HAVE_LIBEFI nvlist_t **child; uint_t c, children; @@ -354,7 +350,6 @@ pool_uses_efi(nvlist_t *config) if (pool_uses_efi(child[c])) return (B_TRUE); } -#endif return (B_FALSE); } @@ -1763,9 +1758,8 @@ 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 errbuf[1024]; -#ifdef HAVE_LIBEFI char path[MAXPATHLEN]; + char errbuf[1024]; int fd, error; int (*_efi_use_whole_disk)(int); @@ -1794,11 +1788,6 @@ 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 */ } /* @@ -3051,7 +3040,6 @@ zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj, free(mntpnt); } -#ifdef HAVE_LIBEFI /* * Read the EFI label from the config, if a label does not exist then * pass back the error to the caller. If the caller has passed a non-NULL @@ -3340,4 +3328,3 @@ out: libzfs_fini(hdl); return (ret); } -#endif /* HAVE_LIBEFI */