mirror of https://gitee.com/openkylin/libvirt.git
storage: avoid use of undefined GLUSTER_CLI variable
Previous commit tried to change configure logic such that the
GLUSTER_CLI parameter would always be set:
commit 9e97c8c0f0
Author: Peter Krempa <pkrempa@redhat.com>
Date: Mon Jan 9 15:56:12 2017 +0100
storage: gluster: Remove build-time dependency on the 'gluster' cli tool
This missed the fact that the AC_PATH_PROG call was itself inside an 'if'
conditional that would not be called in with_storage_gluster was false. As
a result, GLUSTER_CLI was still conditionally defined.
Just kill the GLUSTER_CLI parameter and AC_PATH_PROG call entirely and pass a
bare "gluster" string to virFindFileInPath instead.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
b9cc6316c0
commit
2e045a4f9b
|
@ -603,15 +603,6 @@ LIBVIRT_STORAGE_CHECK_SHEEPDOG
|
|||
LIBVIRT_STORAGE_CHECK_GLUSTER
|
||||
LIBVIRT_STORAGE_CHECK_ZFS
|
||||
|
||||
if test "$with_storage_fs" = "yes" ||
|
||||
test "$with_storage_gluster" = "yes"; then
|
||||
AC_PATH_PROG([GLUSTER_CLI], [gluster], [gluster], [$LIBVIRT_SBIN_PATH])
|
||||
if test "x$GLUSTER_CLI" != "x"; then
|
||||
AC_DEFINE_UNQUOTED([GLUSTER_CLI], ["$GLUSTER_CLI"],
|
||||
[Location or name of the gluster command line tool])
|
||||
fi
|
||||
fi
|
||||
|
||||
with_storage=no
|
||||
for backend in dir fs lvm iscsi scsi mpath rbd disk; do
|
||||
if eval test \$with_storage_$backend = yes; then
|
||||
|
|
|
@ -2437,7 +2437,7 @@ virStorageBackendFindGlusterPoolSources(const char *host,
|
|||
|
||||
int ret = -1;
|
||||
|
||||
if (!(glusterpath = virFindFileInPath(GLUSTER_CLI))) {
|
||||
if (!(glusterpath = virFindFileInPath("gluster"))) {
|
||||
if (report) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("'gluster' command line tool not found"));
|
||||
|
|
Loading…
Reference in New Issue