[Wine-patches] [eterhack] [eter-1.0.12] mountmgr.sys: Hack for Consultant+ for flash drive (eterbug #6508).

Alexander Morozov amorozov на etersoft.ru
Ср Мар 9 21:17:38 MSK 2011


----------- следующая часть -----------
From 85c51e018894ed376d154952cb3af037ab5cacd3 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 9 Mar 2011 21:10:50 +0300
Subject: [PATCH] mountmgr.sys: Hack for Consultant+ for flash drive (eterbug #6508).

---
 dlls/mountmgr.sys/usbhub.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/mountmgr.sys/usbhub.c b/dlls/mountmgr.sys/usbhub.c
index 3f6f3d4..c282d09 100644
--- a/dlls/mountmgr.sys/usbhub.c
+++ b/dlls/mountmgr.sys/usbhub.c
@@ -1727,6 +1727,19 @@ static void stop_device_driver( struct DeviceInstance *instance )
     HeapFree( GetProcessHeap(), 0, instance );
 }
 
+/* HACK for eterbug #6508 */
+static void consult_hack(void)
+{
+    struct DeviceInstance *it, *it2;
+
+    LIST_FOR_EACH_ENTRY_SAFE( it, it2, &Devices, struct DeviceInstance, entry )
+        if (it->dev != NULL && is_mass_storage( it->dev ))
+        {
+            list_remove( &it->entry );
+            list_add_head( &Devices, &it->entry );
+        }
+}
+
 static BOOL is_new( void *dev )
 {
     struct DeviceInstance *instance;
@@ -1804,6 +1817,7 @@ void add_usb_devices(void)
             register_usb_device( desc.idVendor, desc.idProduct, dev );
     }
     libusb_free_device_list( devs, 1 );
+    consult_hack();
     start_device_drivers( usbhub_driver );
 end:
     LeaveCriticalSection( &usbhub_cs );
@@ -1894,6 +1908,7 @@ void add_usb_devices(void)
             if (new_device)
                 register_usb_device( desc->idVendor, desc->idProduct, dev );
         }
+    consult_hack();
     start_device_drivers( usbhub_driver );
 end:
     LeaveCriticalSection( &usbhub_cs );
-- 
1.7.4.1



Подробная информация о списке рассылки Wine-patches