]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: use qemuDomainMachineIsI440FX() in appropriate place
authorLaine Stump <laine@laine.org>
Wed, 29 Apr 2015 16:23:02 +0000 (12:23 -0400)
committerLaine Stump <laine@laine.org>
Mon, 11 May 2015 20:49:47 +0000 (16:49 -0400)
This patch makes qemuValideDevicePCISlotsChipsets() more consistent in
appearance by replacing several clauses of an if with the equivalent
call to qemuDomainMachineIsI440FX. The if was checking exactly the
same items, just in a slightly different order.

src/qemu/qemu_command.c

index fe4622ef7ceade805730e332cc374ee0d79a9fad..d178f69e0f85e1b8d87544fa8420c497f184a752 100644 (file)
@@ -2110,11 +2110,7 @@ qemuValidateDevicePCISlotsChipsets(virDomainDefPtr def,
                                    virQEMUCapsPtr qemuCaps,
                                    virDomainPCIAddressSetPtr addrs)
 {
-    if ((STRPREFIX(def->os.machine, "pc-0.") ||
-        STRPREFIX(def->os.machine, "pc-1.") ||
-        STRPREFIX(def->os.machine, "pc-i440") ||
-        STREQ(def->os.machine, "pc") ||
-        STRPREFIX(def->os.machine, "rhel")) &&
+    if (qemuDomainMachineIsI440FX(def) &&
         qemuValidateDevicePCISlotsPIIX3(def, qemuCaps, addrs) < 0) {
         return -1;
     }