[Wine-patches] [eterhack] usbhub.sys: Fix enumerating devices bug with libusb-0.1.
Alexander Morozov
amorozov на etersoft.ru
Ср Июл 8 18:24:50 MSD 2009
В eterhack неправильно работало перечисление устройств на Fedora 10 в
VirtualBox.
----------- следующая часть -----------
From 0c023dd91992a915e6f09d6fff6b224de0d80b2f Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 8 Jul 2009 16:54:15 +0400
Subject: [eterhack] usbhub.sys: Fix enumerating devices bug with libusb-0.1.
---
dlls/usbhub.sys/usbhub.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/usbhub.sys/usbhub.c b/dlls/usbhub.sys/usbhub.c
index 65b0740..4b3dc9e 100644
--- a/dlls/usbhub.sys/usbhub.c
+++ b/dlls/usbhub.sys/usbhub.c
@@ -1674,14 +1674,17 @@ static DWORD CALLBACK enum_usb_devices( void *usbhubdrv )
usb_find_devices();
for (bus = usb_busses; bus; bus = bus->next)
- {
- desc = &bus->devices->descriptor;
- create_root_hub_device( desc->idVendor, desc->idProduct,
- bus->devices, usbhubdrv );
- }
+ for (dev = bus->devices; dev; dev = dev->next)
+ {
+ if (dev->devnum > 1) continue;
+ desc = &bus->devices->descriptor;
+ create_root_hub_device( desc->idVendor, desc->idProduct,
+ bus->devices, usbhubdrv );
+ }
for (bus = usb_busses; bus; bus = bus->next)
- for (dev = bus->devices->next; dev; dev = dev->next)
+ for (dev = bus->devices; dev; dev = dev->next)
{
+ if (dev->devnum <= 1) continue;
new_device = TRUE;
LIST_FOR_EACH_ENTRY( instance, &Devices, struct DeviceInstance, entry )
{
--
1.6.3.3
Подробная информация о списке рассылки Wine-patches