]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
configure: change HAVE_FIREWALLD to WITH_FIREWALLD
authorLaine Stump <laine@laine.org>
Sat, 26 Jan 2019 04:46:18 +0000 (23:46 -0500)
committerLaine Stump <laine@laine.org>
Fri, 1 Feb 2019 17:08:37 +0000 (12:08 -0500)
Support for firewalld is a feature that can be selectively enabled or
disabled (using --with-firewalld/--without-firewalld), not merely
something that must be accounted for in the code if it is present with
no exceptions. It is more consistent with other usage in libvirt to
use WITH_FIREWALLD rather than HAVE_FIREWALLD.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
m4/virt-firewalld.m4
src/network/bridge_driver.c
src/nwfilter/nwfilter_driver.c

index 08d2ff83d6e394f93f306229e87af6bda84c9588..89efa47589b666bcf9350b8bf85d580a991514a7 100644 (file)
@@ -32,10 +32,10 @@ AC_DEFUN([LIBVIRT_CHECK_FIREWALLD], [
     if test "x$with_dbus" != "xyes" ; then
       AC_MSG_ERROR([You must have dbus enabled for firewalld support])
     fi
-    AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
+    AC_DEFINE_UNQUOTED([WITH_FIREWALLD], [1], [whether firewalld support is enabled])
   fi
 
-  AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" != "xno"])
+  AM_CONDITIONAL([WITH_FIREWALLD], [test "x$with_firewalld" != "xno"])
 ])
 
 AC_DEFUN([LIBVIRT_RESULT_FIREWALLD], [
index a9674ef6c2c640a5c689118b546fca4747debf04..6d80818e40215e15fa184d929a46604cdf7e1690 100644 (file)
@@ -536,7 +536,7 @@ networkAutostartConfig(virNetworkObjPtr obj,
 }
 
 
-#if HAVE_FIREWALLD
+#ifdef WITH_FIREWALLD
 static DBusHandlerResult
 firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
                              DBusMessage *message,
@@ -571,7 +571,7 @@ networkStateInitialize(bool privileged,
     int ret = -1;
     char *configdir = NULL;
     char *rundir = NULL;
-#ifdef HAVE_FIREWALLD
+#ifdef WITH_FIREWALLD
     DBusConnection *sysbus = NULL;
 #endif
 
@@ -662,7 +662,7 @@ networkStateInitialize(bool privileged,
 
     network_driver->networkEventState = virObjectEventStateNew();
 
-#ifdef HAVE_FIREWALLD
+#ifdef WITH_FIREWALLD
     if (!(sysbus = virDBusGetSystemBus())) {
         VIR_WARN("DBus not available, disabling firewalld support "
                  "in bridge_network_driver: %s", virGetLastErrorMessage());
index 0e29d3e19e8ed8c3034093889b7a63653601357d..fdfc6f48fa39690e7e32b4207fdc21f7cdf3ad1a 100644 (file)
@@ -76,7 +76,7 @@ static void nwfilterDriverUnlock(void)
     virMutexUnlock(&driver->lock);
 }
 
-#if HAVE_FIREWALLD
+#ifdef WITH_FIREWALLD
 
 static DBusHandlerResult
 nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
@@ -145,7 +145,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus)
     return ret;
 }
 
-#else /* HAVE_FIREWALLD */
+#else /* WITH_FIREWALLD */
 
 static void
 nwfilterDriverRemoveDBusMatches(void)
@@ -158,7 +158,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
     return 0;
 }
 
-#endif /* HAVE_FIREWALLD */
+#endif /* WITH_FIREWALLD */
 
 static int
 virNWFilterTriggerRebuildImpl(void *opaque)