render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From ea0983a0cca71ba3fdefe94881fe75ee624adf5f Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <ea0983a0cca71ba3fdefe94881fe75ee624adf5f@dist-git>
a41c76
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
a41c76
Date: Wed, 4 Mar 2020 12:42:30 +0100
a41c76
Subject: [PATCH] qemu: use def instead of vm->def in qemuExtDevicesStart
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
We have a helper variable to make the code more concise,
a41c76
use it consistently.
a41c76
a41c76
Signed-off-by: Ján Tomko <jtomko@redhat.com>
a41c76
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
a41c76
(cherry picked from commit e2ca6eb08731255b9b7cf3e938d20f4eae9fb427)
a41c76
Signed-off-by: Ján Tomko <jtomko@redhat.com>
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
a41c76
Message-Id: <3876fc88964781aec976d1a92b810aa9cf53c656.1583322090.git.jtomko@redhat.com>
a41c76
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_extdevice.c | 8 ++++----
a41c76
 1 file changed, 4 insertions(+), 4 deletions(-)
a41c76
a41c76
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
a41c76
index 463f76c21a..1869a42f11 100644
a41c76
--- a/src/qemu/qemu_extdevice.c
a41c76
+++ b/src/qemu/qemu_extdevice.c
a41c76
@@ -159,11 +159,11 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
a41c76
     int ret = 0;
a41c76
     size_t i;
a41c76
 
a41c76
-    if (qemuExtDevicesInitPaths(driver, vm->def) < 0)
a41c76
+    if (qemuExtDevicesInitPaths(driver, def) < 0)
a41c76
         return -1;
a41c76
 
a41c76
-    for (i = 0; i < vm->def->nvideos; i++) {
a41c76
-        virDomainVideoDefPtr video = vm->def->videos[i];
a41c76
+    for (i = 0; i < def->nvideos; i++) {
a41c76
+        virDomainVideoDefPtr video = def->videos[i];
a41c76
 
a41c76
         if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) {
a41c76
             ret = qemuExtVhostUserGPUStart(driver, vm, video);
a41c76
@@ -172,7 +172,7 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
a41c76
         }
a41c76
     }
a41c76
 
a41c76
-    if (vm->def->tpm)
a41c76
+    if (def->tpm)
a41c76
         ret = qemuExtTPMStart(driver, vm, incomingMigration);
a41c76
 
a41c76
     for (i = 0; i < def->nnets; i++) {
a41c76
-- 
a41c76
2.25.1
a41c76