Module: wine Branch: master Commit: 14d411b8a097fa3b335750d0b04a47f2525d6058 URL: https://gitlab.winehq.org/wine/wine/-/commit/14d411b8a097fa3b335750d0b04a47f...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Nov 24 10:33:23 2022 +0100
mountmgr.sys: Use the Unix call helpers.
---
dlls/mountmgr.sys/mountmgr.c | 7 +------ dlls/mountmgr.sys/unixlib.h | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 66034621b44..b67082229f6 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -46,8 +46,6 @@ struct mount_point static struct list mount_points_list = LIST_INIT(mount_points_list); static HKEY mount_key;
-unixlib_handle_t mountmgr_handle = 0; - void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len ) { RtlFreeHeap( GetProcessHeap(), 0, mount->id ); @@ -620,7 +618,6 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) #ifdef _WIN64 HKEY wow64_ports_key = NULL; #endif - void *instance; UNICODE_STRING nameW, linkW; DEVICE_OBJECT *device; HKEY devicemap_key; @@ -629,9 +626,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
TRACE( "%s\n", debugstr_w(path->Buffer) );
- RtlPcToFileHeader( DriverEntry, &instance ); - status = NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs, - &mountmgr_handle, sizeof(mountmgr_handle), NULL ); + status = __wine_init_unix_call(); if (status) return status;
driver->MajorFunction[IRP_MJ_DEVICE_CONTROL] = mountmgr_ioctl; diff --git a/dlls/mountmgr.sys/unixlib.h b/dlls/mountmgr.sys/unixlib.h index d70371876fa..efbce71b979 100644 --- a/dlls/mountmgr.sys/unixlib.h +++ b/dlls/mountmgr.sys/unixlib.h @@ -174,9 +174,7 @@ enum mountmgr_funcs unix_enumerate_credentials, };
-extern unixlib_handle_t mountmgr_handle; - -#define MOUNTMGR_CALL( func, params ) __wine_unix_call( mountmgr_handle, unix_ ## func, params ) +#define MOUNTMGR_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
extern void queue_device_op( enum device_op op, const char *udi, const char *device, const char *mount_point, enum device_type type, const GUID *guid,