On Sat, Aug 20, 2016 at 04:53:04PM +0200, Tomasz Flendrich wrote:
Since we now have a way of relculating the usb address set, all the
places that previously used the cached set now use the recalculated one.
---
src/qemu/qemu_hotplug.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 51f06bc..078d936 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -738,13 +738,13 @@ qemuDomainAttachUSBMassStorageDevice(virQEMUDriverPtr 
driver,
    bool driveAdded = false;
    virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
    const char *src = virDomainDiskGetSource(disk);
-    bool releaseaddr = false;
+    virDomainUSBAddressSetPtr usbaddrs = NULL;

-    if (priv->usbaddrs) {

This condition was only true when we assigned the domain addresses on
domain startup (if it's a new domain, not migrated)...

-        if (virDomainUSBAddressEnsure(priv->usbaddrs, &disk->info) < 0)
-            goto cleanup;
-        releaseaddr = true;
-    }
+    if (!(usbaddrs = qemuDomainUSBAddrSetCreateFromDomain(vm->def)))
+        goto cleanup;

but this new helper does it unconditionally.

Jan

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to