]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: process: Don't set 'allowReboot' when qemu supports 'set-action'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Aug 2021 14:43:26 +0000 (16:43 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Aug 2021 13:32:45 +0000 (15:32 +0200)
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>
src/qemu/qemu_process.c

index f9e8b94c75c37ebd2947a91f6f9e063326749c33..703af95e2ce8b975fb74f10c31d5be0d92055020 100644 (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;