[spice-gtk PATCH v1] win-usb-dev: Set UsbDk backend on libusb 1.0.22

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



win-usb-dev also uses libusb.
Similar to commit 3e23fff9, set libusb backend to UsbDk.
Without this patch usb devices are not seen by win-usb-dev
(windows clients), when UsbDk driver is installed.

Signed-off-by: Uri Lublin <uril@xxxxxxxxxx>
---

Additionally I think the code need to check that usbdk driver
is indeed installed before setting the backend.

---
 src/win-usb-dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
index fe4cb98..0eaf70b 100644
--- a/src/win-usb-dev.c
+++ b/src/win-usb-dev.c
@@ -197,6 +197,10 @@ g_udev_client_initable_init(GInitable *initable, GCancellable *cancellable,
         return FALSE;
     }
 
+#if LIBUSB_API_VERSION >= 0x01000106
+    libusb_set_option(priv->ctx, LIBUSB_OPTION_USE_USBDK);
+#endif
+
     /* get initial device list */
     if (g_udev_client_list_devices(self, &priv->udev_list, err, __FUNCTION__) < 0) {
         goto g_udev_client_init_failed;
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]