[Spice-devel] [PATCH 2/5] windows: fix device matching for non-WinUSB configurations

Christophe Fergeau cfergeau at redhat.com
Thu May 28 07:59:14 PDT 2015


On Thu, May 28, 2015 at 01:24:01PM +0300, Kirill Moizik wrote:
> From: Pavel Gurvich <pavel at daynix.com>
> 
> Match USB devices by bus addresses instead of VID/PID.
> This makes system distinguish between similar devices plugged into
> different USB ports.
> 
> Signed-off-by: Pavel Gurvich <pavel at daynix.com>
> Signed-off-by: Dmitry Fleytman <dmitry at daynix.com>
> ---
>  gtk/usb-device-manager.c | 37 +++++++++++++++++++++++++++++++------
>  1 file changed, 31 insertions(+), 6 deletions(-)
> 
> diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
> index e1f03e2..7739337 100644
> --- a/gtk/usb-device-manager.c
> +++ b/gtk/usb-device-manager.c
> @@ -668,10 +668,10 @@ static gboolean spice_usb_device_manager_get_udev_bus_n_address(
>  
>      *bus = *address = 0;
>  
> -#ifndef G_OS_WIN32
> +#ifndef USE_WINUSB
>      bus_str = g_udev_device_get_property(udev, "BUSNUM");
>      address_str = g_udev_device_get_property(udev, "DEVNUM");
> -#else /* Windows -- request vid:pid instead */
> +#else /* WinUSB -- request vid:pid instead */
>      bus_str = g_udev_device_get_property(udev, "VID");
>      address_str = g_udev_device_get_property(udev, "PID");
>  #endif

Same question as for patch 1/5, given that usbdk will only be enabled in
the #ifdef USE_WINUSB block, when is the first block here used?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150528/0aef067d/attachment.sig>


More information about the Spice-devel mailing list