[Spice-devel] windows spice usb ,cause virt-view crash

王凡 wangfan1987.good at 163.com
Mon Aug 6 09:17:42 UTC 2018


Developers,
         You are good。
         When the spice-gtk windows system maps USB devices,Spice-gtk is now using usbdk as a backend driver by default 。usbdk provides another driver option for libusb Windows backend. For 1.0.21, usbdk is a compile-time option, but it becomes a runtime option from version 1.0.22 onwards。
         So,When mapping USB to use the libusb 1.0.22 version And when usbdk is not installed,will cause virt-view crash.spice-gtk need set libusb usb usbdk。
         The appendix is patch.Thank you! 
         
        diff -uNr a/usb-device-manager.c b/usb-device-manager.c
--- a/usb-device-manager.c      2018-08-06 17:00:05.450589413 +0800
+++ b/usb-device-manager.c      2018-08-06 16:58:30.964787845 +0800
@@ -302,6 +302,9 @@
                     "Error initializing USB support: %s [%i]", desc, rc);
         return FALSE;
      }
+#ifdef G_OS_WIN32
+    libusb_set_option(priv->context,LIBUSB_OPTION_USE_USBDK);
+#endif
     /* Start listening for usb devices plug / unplug */
 #ifdef USE_GUDEV






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180806/c23bcd2d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spicelibusb_init.patch
Type: application/octet-stream
Size: 474 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180806/c23bcd2d/attachment-0001.obj>


More information about the Spice-devel mailing list