From 65be7572d2ef0228b111c2a1bbc90ee95179b706 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 8 Oct 2014 17:51:19 -0400 Subject: [PATCH] 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. --- src/qemu/qemu_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.47.2