]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Use correct domain xml flag
authorEric Blake <eblake@redhat.com>
Thu, 14 Feb 2019 18:53:36 +0000 (12:53 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 19 Feb 2019 23:02:43 +0000 (17:02 -0600)
Although VIR_DOMAIN_DEF_FORMAT_INACTIVE and VIR_DOMAIN_XML_INACTIVE
happen to have the same value (1<<1), they come from different enums;
and it is nicer to reason about a 'flags' variable if all uses of
that variable are compared against the same enum type.  Messed up in
commit 06f75ff2 (3.8.0).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_driver.c

index 2c8bcde10bafbef282d049245244152c3b7daea6..1ea3dcf8f7c992d336974761c2efc499cd2d4493 100644 (file)
@@ -7357,7 +7357,7 @@ static char
      * ignore the VIR_DOMAIN_XML_UPDATE_CPU flag.
      */
     if (virDomainObjIsActive(vm) &&
-        !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE))
+        !(flags & VIR_DOMAIN_XML_INACTIVE))
         flags &= ~VIR_DOMAIN_XML_UPDATE_CPU;
 
     ret = qemuDomainFormatXML(driver, vm, flags);