Reverting changes on linux-have-libefi topic branch.
This commit is contained in:
parent
dcd9fe036c
commit
f73cff230f
|
@ -361,7 +361,6 @@ check_file(const char *file, boolean_t force, boolean_t isspare)
|
||||||
static boolean_t
|
static boolean_t
|
||||||
is_whole_disk(const char *arg)
|
is_whole_disk(const char *arg)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
struct dk_gpt *label;
|
struct dk_gpt *label;
|
||||||
int fd;
|
int fd;
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
|
@ -377,9 +376,6 @@ is_whole_disk(const char *arg)
|
||||||
efi_free(label);
|
efi_free(label);
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
return (B_TRUE);
|
return (B_TRUE);
|
||||||
#else
|
|
||||||
return (B_FALSE);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -889,7 +885,6 @@ check_replication(nvlist_t *config, nvlist_t *newroot)
|
||||||
static int
|
static int
|
||||||
make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
nvlist_t **child;
|
nvlist_t **child;
|
||||||
uint_t c, children;
|
uint_t c, children;
|
||||||
char *type, *path, *diskname;
|
char *type, *path, *diskname;
|
||||||
|
@ -977,7 +972,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||||
for (c = 0; c < children; c++)
|
for (c = 0; c < children; c++)
|
||||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
if ((ret = make_disks(zhp, child[c])) != 0)
|
||||||
return (ret);
|
return (ret);
|
||||||
#endif
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,8 @@
|
||||||
#include "zfs_namecheck.h"
|
#include "zfs_namecheck.h"
|
||||||
#include "zfs_prop.h"
|
#include "zfs_prop.h"
|
||||||
#include "libzfs_impl.h"
|
#include "libzfs_impl.h"
|
||||||
#include "zfs_config.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
|
static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__i386) || defined(__amd64)
|
#if defined(__i386) || defined(__amd64)
|
||||||
#define BOOTCMD "installgrub(1M)"
|
#define BOOTCMD "installgrub(1M)"
|
||||||
|
@ -346,7 +343,6 @@ bootfs_name_valid(const char *pool, char *bootfs)
|
||||||
static boolean_t
|
static boolean_t
|
||||||
pool_uses_efi(nvlist_t *config)
|
pool_uses_efi(nvlist_t *config)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
nvlist_t **child;
|
nvlist_t **child;
|
||||||
uint_t c, children;
|
uint_t c, children;
|
||||||
|
|
||||||
|
@ -358,7 +354,6 @@ pool_uses_efi(nvlist_t *config)
|
||||||
if (pool_uses_efi(child[c]))
|
if (pool_uses_efi(child[c]))
|
||||||
return (B_TRUE);
|
return (B_TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return (B_FALSE);
|
return (B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1767,9 +1762,8 @@ 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 errbuf[1024];
|
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
|
char errbuf[1024];
|
||||||
int fd, error;
|
int fd, error;
|
||||||
int (*_efi_use_whole_disk)(int);
|
int (*_efi_use_whole_disk)(int);
|
||||||
|
|
||||||
|
@ -1798,11 +1792,6 @@ 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 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3046,7 +3035,6 @@ zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj,
|
||||||
free(mntpnt);
|
free(mntpnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBEFI
|
|
||||||
/*
|
/*
|
||||||
* Read the EFI label from the config, if a label does not exist then
|
* 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
|
* pass back the error to the caller. If the caller has passed a non-NULL
|
||||||
|
@ -3335,4 +3323,3 @@ out:
|
||||||
libzfs_fini(hdl);
|
libzfs_fini(hdl);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBEFI */
|
|
||||||
|
|
Loading…
Reference in New Issue