提交 4bf0f390 编写于 作者: L Laine Stump

configure: change HAVE_FIREWALLD to WITH_FIREWALLD

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: NLaine Stump <laine@laine.org>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 170f8350
......@@ -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], [
......
......@@ -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());
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册