render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c313de
From cdb5af98d3801255903c4237269ca5723abc36c1 Mon Sep 17 00:00:00 2001
c313de
Message-Id: <cdb5af98d3801255903c4237269ca5723abc36c1@dist-git>
c313de
From: Michal Privoznik <mprivozn@redhat.com>
c313de
Date: Thu, 27 Jun 2019 14:44:44 +0200
c313de
Subject: [PATCH] qemu: Use @tmpChr in qemuDomainDetachChrDevice to build
c313de
 device string
c313de
c313de
So far we are passing @chr to qemuBuildChrDeviceStr. This is
c313de
suboptimal (in fact wrong) because @chr is just parsed XML
c313de
definition provided by user which by definition may lack some
c313de
information. On the other hand, @tmpChr is the one that was found
c313de
using @chr in domain definition so it contains the same amount of
c313de
information or more.
c313de
c313de
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c313de
Reviewed-by: John Ferlan <jferlan@redhat.com>
c313de
(cherry picked from commit f538f5ed3a876c3cb67ae5b7a01f133f192aca13)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1624204
c313de
c313de
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c313de
Message-Id: <75600f93c5e22f43762635ac97f5a0acef1cf465.1561639408.git.mprivozn@redhat.com>
c313de
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
c313de
---
c313de
 src/qemu/qemu_hotplug.c | 2 +-
c313de
 1 file changed, 1 insertion(+), 1 deletion(-)
c313de
c313de
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
c313de
index 5b9a5683bb..da9d56ffb1 100644
c313de
--- a/src/qemu/qemu_hotplug.c
c313de
+++ b/src/qemu/qemu_hotplug.c
c313de
@@ -5753,7 +5753,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
c313de
 
c313de
     sa_assert(tmpChr->info.alias);
c313de
 
c313de
-    if (qemuBuildChrDeviceStr(&devstr, vmdef, chr, priv->qemuCaps) < 0)
c313de
+    if (qemuBuildChrDeviceStr(&devstr, vmdef, tmpChr, priv->qemuCaps) < 0)
c313de
         goto cleanup;
c313de
 
c313de
     if (!async)
c313de
-- 
c313de
2.22.0
c313de