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 <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2021-08-23 16:43:26 +02:00
parent b67e450a5a
commit 3061f8f9cb
1 changed files with 5 additions and 0 deletions

View File

@ -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;