From: Peter Krempa Date: Mon, 23 Aug 2021 14:43:26 +0000 (+0200) Subject: qemu: process: Don't set 'allowReboot' when qemu supports 'set-action' X-Git-Tag: v7.7.0-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3061f8f9cb50609bbc9844340a60aa33ee4d7b2c;p=thirdparty%2Flibvirt.git qemu: process: Don't set 'allowReboot' when qemu supports 'set-action' We don't use the value of the flag when the new handling is in place so we don't have to initialize it. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f9e8b94c75..703af95e2c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6354,6 +6354,11 @@ qemuProcessPrepareAllowReboot(virDomainObj *vm) virDomainDef *def = vm->def; qemuDomainObjPrivate *priv = vm->privateData; + /* with 'set-action' QMP command we don't need to keep this around as + * we always update qemu with the proper state */ + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SET_ACTION)) + return; + if (priv->allowReboot != VIR_TRISTATE_BOOL_ABSENT) return;