On 1/17/20 7:37 PM, Marek Marczykowski-Górecki wrote: > 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=... Wow, that's been overlooked for quite some time. > > Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx> and pushed now. Regards, Jim > --- > src/libxl/libxl_driver.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c > index bece313ec5..d45e42c100 100644 > --- a/src/libxl/libxl_driver.c > +++ b/src/libxl/libxl_driver.c > @@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver) > > static int > libxlStateInitialize(bool privileged, > - virStateInhibitCallback callback G_GNUC_UNUSED, > - void *opaque G_GNUC_UNUSED) > + virStateInhibitCallback callback, > + void *opaque) > { > libxlDriverConfigPtr cfg; > char *driverConf = NULL; > @@ -670,6 +670,9 @@ libxlStateInitialize(bool privileged, > return VIR_DRV_STATE_INIT_ERROR; > } > > + libxl_driver->inhibitCallback = callback; > + libxl_driver->inhibitOpaque = opaque; > + > /* Allocate bitmap for vnc port reservation */ > if (!(libxl_driver->reservedGraphicsPorts = > virPortAllocatorRangeNew(_("VNC"), >