[Wine-patches] [eterhack eter-2.0.0 2/2] services: Run drivers first (eterbug #7400).
Alexander Morozov
amorozov на etersoft.ru
Пн Май 21 18:14:26 MSK 2012
---
programs/services/services.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/programs/services/services.c b/programs/services/services.c
index a517d1f..9df72f9 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -270,7 +270,7 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
static const WCHAR mountmgr[] = {'M','o','u','n','t','M','g','r',0};
#endif
struct service_entry **services_list;
- unsigned int i = 0;
+ unsigned int i = 0, first_non_driver = 0;
unsigned int size = 32;
struct service_entry *service;
@@ -297,6 +297,14 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
}
services_list[i] = service;
service->ref_count++;
+ /* run drivers first */
+ if (service->config.dwServiceType == SERVICE_KERNEL_DRIVER)
+ {
+ struct service_entry *se = services_list[first_non_driver];
+ services_list[first_non_driver] = services_list[i];
+ services_list[i] = se;
+ first_non_driver++;
+ }
i++;
}
}
--
1.7.9.7
Подробная информация о списке рассылки Wine-patches