[PATCH 24/28] Rename HAVE_LIBSSH2 to WITH_SSH2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

---
 configure.ac           |  4 ++--
 src/Makefile.am        |  4 ++--
 src/rpc/virnetsocket.c | 18 +++++++++---------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 85444cf..6c413d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1426,11 +1426,11 @@ if test "$with_phyp" = "yes"; then
     AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM driver is enabled])
 fi
 if test "$with_libssh2_transport" = "yes"; then
-    AC_DEFINE_UNQUOTED([HAVE_LIBSSH2], 1, [whether libssh2 transport is enabled])
+    AC_DEFINE_UNQUOTED([WITH_SSH2], 1, [whether libssh2 transport is enabled])
 fi
 
 AM_CONDITIONAL([WITH_PHYP],[test "$with_phyp" = "yes"])
-AM_CONDITIONAL([HAVE_LIBSSH2], [test "$with_libssh2_transport" = "yes"])
+AM_CONDITIONAL([WITH_SSH2], [test "$with_libssh2_transport" = "yes"])
 
 AC_SUBST([LIBSSH2_CFLAGS])
 AC_SUBST([LIBSSH2_LIBS])
diff --git a/src/Makefile.am b/src/Makefile.am
index ede67e9..61944ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1426,7 +1426,7 @@ if WITH_SASL
 USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
 endif
 
-if HAVE_LIBSSH2
+if WITH_SSH2
 USED_SYM_FILES += $(srcdir)/libvirt_libssh2.syms
 endif
 
@@ -1772,7 +1772,7 @@ libvirt_net_rpc_la_SOURCES = \
 	rpc/virnetsocket.h rpc/virnetsocket.c \
 	rpc/virkeepaliveprotocol.h rpc/virkeepaliveprotocol.c \
 	rpc/virkeepalive.h rpc/virkeepalive.c
-if HAVE_LIBSSH2
+if WITH_SSH2
 libvirt_net_rpc_la_SOURCES += \
 	rpc/virnetsshsession.h rpc/virnetsshsession.c
 else
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 7364482..5f97d6e 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -51,7 +51,7 @@
 
 #include "passfd.h"
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
 # include "virnetsshsession.h"
 #endif
 
@@ -93,7 +93,7 @@ struct _virNetSocket {
     size_t saslEncodedLength;
     size_t saslEncodedOffset;
 #endif
-#if HAVE_LIBSSH2
+#if WITH_SSH2
     virNetSSHSessionPtr sshSession;
 #endif
 };
@@ -738,7 +738,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
     return virNetSocketNewConnectCommand(cmd, retsock);
 }
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
 int
 virNetSocketNewConnectLibSSH2(const char *host,
                               const char *port,
@@ -870,7 +870,7 @@ virNetSocketNewConnectLibSSH2(const char *host ATTRIBUTE_UNUSED,
                          _("libssh2 transport support was not enabled"));
     return -1;
 }
-#endif /* HAVE_LIBSSH2 */
+#endif /* WITH_SSH2 */
 
 int virNetSocketNewConnectExternal(const char **cmdargv,
                                    virNetSocketPtr *retsock)
@@ -1025,7 +1025,7 @@ void virNetSocketDispose(void *obj)
     virObjectUnref(sock->saslSession);
 #endif
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
     virObjectUnref(sock->sshSession);
 #endif
 
@@ -1234,7 +1234,7 @@ bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
     bool hasCached = false;
     virMutexLock(&sock->lock);
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
     if (virNetSSHSessionHasCachedData(sock->sshSession))
         hasCached = true;
 #endif
@@ -1247,7 +1247,7 @@ bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
     return hasCached;
 }
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
 static ssize_t virNetSocketLibSSH2Read(virNetSocketPtr sock,
                                        char *buf,
                                        size_t len)
@@ -1281,7 +1281,7 @@ static ssize_t virNetSocketReadWire(virNetSocketPtr sock, char *buf, size_t len)
     char *errout = NULL;
     ssize_t ret;
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
     if (sock->sshSession)
         return virNetSocketLibSSH2Read(sock, buf, len);
 #endif
@@ -1340,7 +1340,7 @@ static ssize_t virNetSocketWriteWire(virNetSocketPtr sock, const char *buf, size
 {
     ssize_t ret;
 
-#if HAVE_LIBSSH2
+#if WITH_SSH2
     if (sock->sshSession)
         return virNetSocketLibSSH2Write(sock, buf, len);
 #endif
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]