提交 3e03d1bd 编写于 作者: D Daniel P. Berrange

Fix conditional check for DBus

The DBus conditional was renamed way back:

  commit da77f04e
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Thu Sep 20 15:05:39 2012 +0100

    Convert HAVE_DBUS to WITH_DBUS

but the shutdown inhibit code was not updated. Thus libvirt
was never inhibiting shutdown by a logged in user when VMs
are running.
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 b4982558
......@@ -795,7 +795,7 @@ static void daemonInhibitCallback(bool inhibit, void *opaque)
}
#ifdef HAVE_DBUS
#ifdef WITH_DBUS
static DBusConnection *sessionBus;
static DBusConnection *systemBus;
......@@ -887,7 +887,7 @@ static void daemonRunStateInit(void *opaque)
driversInitialized = true;
#ifdef HAVE_DBUS
#ifdef WITH_DBUS
/* Tie the non-privileged libvirtd to the session/shutdown lifecycle */
if (!virNetDaemonIsPrivileged(dmn)) {
......
......@@ -437,7 +437,7 @@ virNetDaemonAutoShutdown(virNetDaemonPtr dmn,
}
#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD)
#if defined(WITH_DBUS) && defined(DBUS_TYPE_UNIX_FD)
static void
virNetDaemonGotInhibitReply(DBusPendingCall *pending,
void *opaque)
......@@ -529,7 +529,7 @@ virNetDaemonAddShutdownInhibition(virNetDaemonPtr dmn)
VIR_DEBUG("dmn=%p inhibitions=%zu", dmn, dmn->autoShutdownInhibitions);
#if defined(HAVE_DBUS) && defined(DBUS_TYPE_UNIX_FD)
#if defined(WITH_DBUS) && defined(DBUS_TYPE_UNIX_FD)
if (dmn->autoShutdownInhibitions == 1)
virNetDaemonCallInhibit(dmn,
"shutdown",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册