]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
hotplug: Check for alias in controller detach
authorJohn Ferlan <jferlan@redhat.com>
Wed, 8 Oct 2014 21:51:19 +0000 (17:51 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 29 Oct 2014 01:12:08 +0000 (21:12 -0400)
In qemuDomainDetachControllerDevice if the info.alias already exists
a call to qemuAssignDeviceControllerAlias would overwrite the existing
so avoid this possibility.

src/qemu/qemu_hotplug.c

index 1e504ec591bc98dd0f6333abc98c43f1859c4098..9c0f6c90ff2059b245a9bbd48116abd4ded675c8 100644 (file)
@@ -3226,7 +3226,8 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
+    if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
+        !detach->info.alias) {
         if (qemuAssignDeviceControllerAlias(detach) < 0)
             goto cleanup;
     }