Module: wine Branch: master Commit: bbe6c13605dd63382712aa517bc3b41aea286049 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbe6c13605dd63382712aa517b...
Author: Alexandre Julliard julliard@winehq.org Date: Wed May 3 11:46:50 2017 +0200
mountmgr: Create the DEVICEMAP registry keys in their respective driver.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mountmgr.sys/device.c | 3 ++- dlls/mountmgr.sys/mountmgr.c | 16 ---------------- 2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index ee25999..49bcc90 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1121,7 +1121,8 @@ static void create_port_devices( DRIVER_OBJECT *driver ) p += 3;
RegOpenKeyExW( HKEY_LOCAL_MACHINE, ports_keyW, 0, KEY_QUERY_VALUE, &wine_ports_key ); - RegOpenKeyExW( HKEY_LOCAL_MACHINE, windows_ports_key_name, 0, KEY_SET_VALUE, &windows_ports_key ); + RegCreateKeyExW( HKEY_LOCAL_MACHINE, windows_ports_key_name, 0, NULL, REG_OPTION_VOLATILE, + KEY_ALL_ACCESS, NULL, &windows_ports_key, NULL );
/* remove old symlinks */ for (n = 1; n <= MAX_PORTS; n++) diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index d3f774a..1eb0a78 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -421,14 +421,10 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) static const WCHAR harddiskW[] = {'\','D','r','i','v','e','r','\','H','a','r','d','d','i','s','k',0}; static const WCHAR driver_serialW[] = {'\','D','r','i','v','e','r','\','S','e','r','i','a','l',0}; static const WCHAR driver_parallelW[] = {'\','D','r','i','v','e','r','\','P','a','r','a','l','l','e','l',0}; - static const WCHAR devicemapW[] = {'H','A','R','D','W','A','R','E','\','D','E','V','I','C','E','M','A','P',0}; - static const WCHAR parallelW[] = {'P','A','R','A','L','L','E','L',' ','P','O','R','T','S',0}; - static const WCHAR serialW[] = {'S','E','R','I','A','L','C','O','M','M',0};
UNICODE_STRING nameW, linkW; DEVICE_OBJECT *device; NTSTATUS status; - HKEY hkey, devicemap_key;
TRACE( "%s\n", debugstr_w(path->Buffer) );
@@ -447,18 +443,6 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) RegCreateKeyExW( HKEY_LOCAL_MACHINE, mounted_devicesW, 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &mount_key, NULL );
- if (!RegCreateKeyExW( HKEY_LOCAL_MACHINE, devicemapW, 0, NULL, REG_OPTION_VOLATILE, - KEY_ALL_ACCESS, NULL, &devicemap_key, NULL )) - { - if (!RegCreateKeyExW( devicemap_key, parallelW, 0, NULL, REG_OPTION_VOLATILE, - KEY_ALL_ACCESS, NULL, &hkey, NULL )) - RegCloseKey( hkey ); - if (!RegCreateKeyExW( devicemap_key, serialW, 0, NULL, REG_OPTION_VOLATILE, - KEY_ALL_ACCESS, NULL, &hkey, NULL )) - RegCloseKey( hkey ); - RegCloseKey( devicemap_key ); - } - RtlInitUnicodeString( &nameW, harddiskW ); status = IoCreateDriver( &nameW, harddisk_driver_entry );