[libvirt] [PATCH v3 2/7] hotplug: Check for alias in controller detach
John Ferlan
jferlan at redhat.com
Thu Oct 9 00:08:43 UTC 2014
In qemuDomainDetachControllerDevice if the info.alias already exists
a call to qemuAssignDeviceControllerAlias would overwrite the existing
so avoid this possibility.
Signed-off-by: John Ferlan <jferlan at redhat.com>
---
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 1e504ec..9c0f6c9 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;
}
--
1.9.3
More information about the libvir-list
mailing list