[libvirt] [PATCH 4/4] Removed unneeded check

Ján Tomko jtomko at redhat.com
Tue Sep 15 08:05:22 UTC 2015


From: Pavel Fedin <p.fedin at samsung.com>

Since test suite now correctly creates capabilities cache, the hack is not
needed any more.

Signed-off-by: Pavel Fedin <p.fedin at samsung.com>
Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/qemu/qemu_domain.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c8b0ccd..26ca12d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1039,10 +1039,7 @@ qemuDomainDefPostParse(virDomainDefPtr def,
         return ret;
 
 
-    /* This condition is actually a (temporary) hack for test suite which
-     * does not create capabilities cache */
-    if (driver && driver->qemuCapsCache)
-        qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
+    qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
 
     /* Add implicit PCI root controller if the machine has one */
     switch (def->os.arch) {
@@ -1241,10 +1238,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
     if (driver)
         cfg = virQEMUDriverGetConfig(driver);
 
-    /* This condition is actually a (temporary) hack for test suite which
-     * does not create capabilities cache */
-    if (driver && driver->qemuCapsCache)
-        qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
+    qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
 
     if (dev->type == VIR_DOMAIN_DEVICE_NET &&
         dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
-- 
2.4.6




More information about the libvir-list mailing list