mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
libxl: initialize shutdown inhibit callback
The libxl driver already tries to call shutdown inhibit callback in the right places, but only if it's set. That last part was missing, resulting in premature shutdown when running libvirtd --timeout=... Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
a5b1b1fa48
commit
6c1dddaf97
@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
libxlStateInitialize(bool privileged,
|
libxlStateInitialize(bool privileged,
|
||||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
virStateInhibitCallback callback,
|
||||||
void *opaque G_GNUC_UNUSED)
|
void *opaque)
|
||||||
{
|
{
|
||||||
libxlDriverConfigPtr cfg;
|
libxlDriverConfigPtr cfg;
|
||||||
char *driverConf = NULL;
|
char *driverConf = NULL;
|
||||||
@ -670,6 +670,9 @@ libxlStateInitialize(bool privileged,
|
|||||||
return VIR_DRV_STATE_INIT_ERROR;
|
return VIR_DRV_STATE_INIT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libxl_driver->inhibitCallback = callback;
|
||||||
|
libxl_driver->inhibitOpaque = opaque;
|
||||||
|
|
||||||
/* Allocate bitmap for vnc port reservation */
|
/* Allocate bitmap for vnc port reservation */
|
||||||
if (!(libxl_driver->reservedGraphicsPorts =
|
if (!(libxl_driver->reservedGraphicsPorts =
|
||||||
virPortAllocatorRangeNew(_("VNC"),
|
virPortAllocatorRangeNew(_("VNC"),
|
||||||
|
Loading…
Reference in New Issue
Block a user