From: John Ferlan Date: Wed, 8 Oct 2014 21:51:19 +0000 (-0400) Subject: hotplug: Check for alias in controller detach X-Git-Tag: v1.2.10-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65be7572d2ef0228b111c2a1bbc90ee95179b706;p=thirdparty%2Flibvirt.git hotplug: Check for alias in controller detach In qemuDomainDetachControllerDevice if the info.alias already exists a call to qemuAssignDeviceControllerAlias would overwrite the existing so avoid this possibility. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1e504ec591..9c0f6c90ff 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -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; }