mirror of https://gitee.com/openkylin/libvirt.git
Fix conditional check for DBus
The DBus conditional was renamed way back:
commit da77f04ed5
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: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
b49825584a
commit
3e03d1bd7e
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue