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@xxxxxxxxx> --- New patch in V2 (NB, I already pushed patch 1 from V1, as it was ACKed, and not directly related to the rest of the series) m4/virt-firewalld.m4 | 4 ++-- src/network/bridge_driver.c | 6 +++--- src/nwfilter/nwfilter_driver.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/m4/virt-firewalld.m4 b/m4/virt-firewalld.m4 index 08d2ff83d6..89efa47589 100644 --- a/m4/virt-firewalld.m4 +++ b/m4/virt-firewalld.m4 @@ -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], [ diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 20a0f65e65..238ea2e68e 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -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()); diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 0e29d3e19e..fdfc6f48fa 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -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) -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list