]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Drop redundant version checks
authorAndrea Bolognani <abologna@redhat.com>
Wed, 12 Sep 2018 12:41:25 +0000 (14:41 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 12 Sep 2018 13:36:54 +0000 (15:36 +0200)
We require QEMU 1.5.0 these days, so checking for versions
older than that is pointless.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_capabilities.c

index 5ac15ad5b0ba614d5e4a94d3db6ebffc2be2b448..1b60c13ee7860303ff3a0e2fc6194834e56d7716 100644 (file)
@@ -1726,10 +1726,10 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
          *
          *    ref405ep: no pci
          *       taihu: no pci
-         *      bamboo: 1.1.0
+         *      bamboo: 1.1.0 (<= 1.5.0, so basically forever)
          *       mac99: 2.0.0
          *     g3beige: 2.0.0
-         *        prep: 1.4.0
+         *        prep: 1.4.0 (<= 1.5.0, so basically forever)
          *     pseries: 2.0.0
          *   mpc8544ds: forever
          * virtex-m507: no pci
@@ -1751,16 +1751,11 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
             STREQ(def->os.machine, "ppce500"))
             return true;
 
-        if (qemuCaps->version >= 1004000 &&
-            STREQ(def->os.machine, "prep"))
-            return true;
-
-        if (qemuCaps->version >= 1001000 &&
-            STREQ(def->os.machine, "bamboo"))
-            return true;
-
-        if (STREQ(def->os.machine, "mpc8544ds"))
+        if (STREQ(def->os.machine, "bamboo") ||
+            STREQ(def->os.machine, "mpc8544ds") ||
+            STREQ(def->os.machine, "prep")) {
             return true;
+        }
 
         return false;
     }