Merge branch 'linux-have-libefi' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
3f0871ac8a
|
@ -46,6 +46,7 @@
|
||||||
#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"
|
||||||
|
|
||||||
static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
|
static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
|
||||||
|
|
||||||
|
@ -2808,6 +2809,7 @@ read_efi_label(nvlist_t *config, diskaddr_t *sb)
|
||||||
* determine where a partition starts on a disk in the current
|
* determine where a partition starts on a disk in the current
|
||||||
* configuration
|
* configuration
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_LIBEFI
|
||||||
static diskaddr_t
|
static diskaddr_t
|
||||||
find_start_block(nvlist_t *config)
|
find_start_block(nvlist_t *config)
|
||||||
{
|
{
|
||||||
|
@ -3060,3 +3062,4 @@ out:
|
||||||
libzfs_fini(hdl);
|
libzfs_fini(hdl);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_LIBEFI */
|
||||||
|
|
|
@ -364,6 +364,7 @@ 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];
|
||||||
|
@ -379,6 +380,9 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -888,6 +892,7 @@ 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;
|
||||||
|
@ -975,7 +980,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue