[Spice-devel] [spice-gtk PATCH v1] win-usb-dev: Set UsbDk backend on libusb 1.0.22
Uri Lublin
uril at redhat.com
Tue Jan 8 09:02:04 UTC 2019
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 at redhat.com>
---
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
More information about the Spice-devel
mailing list