Refresh linux-have-libefi
This commit is contained in:
parent
9baaa468ac
commit
e16c26f81a
17
.topmsg
17
.topmsg
|
@ -1,19 +1,6 @@
|
|||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Subject: [PATCH] zfs branch
|
||||
Subject: [PATCH] linux have libefi
|
||||
|
||||
Merged result of all changes which are relevant to both Solaris
|
||||
and Linux builds of the ZFS code. These are changes where there
|
||||
is a reasonable chance they will be accepted upstream.
|
||||
|
||||
Additionally, since this is effectively the root of the linux
|
||||
ZFS tree the core linux build system is added here. This
|
||||
includes autogen.sh, configure.ac, m4 macros, some scripts/*,
|
||||
and makefiles for all the core ZFS components. Linux-only
|
||||
features which require tweaks to the build system should appear
|
||||
on the relevant topic branches. All autotools products which
|
||||
result from autogen.sh are commited to the linux-configure-branch.
|
||||
|
||||
This branch also contains the META, ChangeLog, AUTHORS,
|
||||
README, and GIT files.
|
||||
Use libefi if HAVE_LIBEFI defined
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "zfs_namecheck.h"
|
||||
#include "zfs_prop.h"
|
||||
#include "libzfs_impl.h"
|
||||
#include "zfs_config.h"
|
||||
|
||||
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
|
||||
* configuration
|
||||
*/
|
||||
#ifdef HAVE_LIBEFI
|
||||
static diskaddr_t
|
||||
find_start_block(nvlist_t *config)
|
||||
{
|
||||
|
@ -3060,3 +3062,4 @@ out:
|
|||
libzfs_fini(hdl);
|
||||
return (ret);
|
||||
}
|
||||
#endif /* HAVE_LIBEFI */
|
||||
|
|
|
@ -360,6 +360,7 @@ 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];
|
||||
|
@ -375,6 +376,9 @@ is_whole_disk(const char *arg)
|
|||
efi_free(label);
|
||||
(void) close(fd);
|
||||
return (B_TRUE);
|
||||
#else
|
||||
return (B_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -884,6 +888,7 @@ 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;
|
||||
|
@ -971,7 +976,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue