mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 09:00:48 +00:00
ntdll: Replace the wine_server_handle_to_fd() syscall by a Unix call.
This commit is contained in:
parent
6d27bcbe2c
commit
46d0da53b6
|
@ -3231,6 +3231,17 @@ NTSTATUS CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned i
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* wine_server_handle_to_fd (NTDLL.@)
|
||||
*/
|
||||
NTSTATUS CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd,
|
||||
unsigned int *options )
|
||||
{
|
||||
struct wine_server_handle_to_fd_params params = { handle, access, unix_fd, options };
|
||||
|
||||
return WINE_UNIX_CALL( unix_wine_server_handle_to_fd, ¶ms );
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* LdrLoadDll (NTDLL.@)
|
||||
*/
|
||||
|
|
|
@ -1690,7 +1690,7 @@
|
|||
# Server interface
|
||||
@ cdecl -norelay wine_server_call(ptr)
|
||||
@ cdecl wine_server_fd_to_handle(long long long ptr)
|
||||
@ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr)
|
||||
@ cdecl wine_server_handle_to_fd(long long ptr ptr)
|
||||
|
||||
# Unix interface
|
||||
@ stdcall __wine_unix_call(int64 long ptr)
|
||||
|
|
|
@ -358,7 +358,6 @@ static void * const syscalls[] =
|
|||
NtWriteVirtualMemory,
|
||||
NtYieldExecution,
|
||||
wine_nt_to_unix_file_name,
|
||||
wine_server_handle_to_fd,
|
||||
wine_unix_to_nt_file_name,
|
||||
};
|
||||
|
||||
|
@ -2060,6 +2059,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
|
|||
unixcall_wine_dbg_write,
|
||||
unixcall_wine_server_call,
|
||||
unixcall_wine_server_fd_to_handle,
|
||||
unixcall_wine_server_handle_to_fd,
|
||||
unixcall_wine_spawnvp,
|
||||
system_time_precise,
|
||||
};
|
||||
|
@ -2080,6 +2080,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
|
|||
wow64_wine_dbg_write,
|
||||
wow64_wine_server_call,
|
||||
wow64_wine_server_fd_to_handle,
|
||||
wow64_wine_server_handle_to_fd,
|
||||
wow64_wine_spawnvp,
|
||||
system_time_precise,
|
||||
};
|
||||
|
|
|
@ -1132,6 +1132,17 @@ NTSTATUS CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* unixcall_wine_server_handle_to_fd
|
||||
*/
|
||||
NTSTATUS unixcall_wine_server_handle_to_fd( void *args )
|
||||
{
|
||||
struct wine_server_handle_to_fd_params *params = args;
|
||||
|
||||
return wine_server_handle_to_fd( params->handle, params->access, params->unix_fd, params->options );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* server_pipe
|
||||
*
|
||||
|
@ -1846,4 +1857,21 @@ NTSTATUS wow64_wine_server_fd_to_handle( void *args )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* wow64_wine_server_handle_to_fd
|
||||
*/
|
||||
NTSTATUS wow64_wine_server_handle_to_fd( void *args )
|
||||
{
|
||||
struct
|
||||
{
|
||||
ULONG handle;
|
||||
unsigned int access;
|
||||
ULONG unix_fd;
|
||||
ULONG options;
|
||||
} const *params32 = args;
|
||||
|
||||
return wine_server_handle_to_fd( ULongToHandle( params32->handle ), params32->access,
|
||||
ULongToPtr( params32->unix_fd ), ULongToPtr( params32->options ));
|
||||
}
|
||||
|
||||
#endif /* _WIN64 */
|
||||
|
|
|
@ -286,11 +286,13 @@ extern void set_async_direct_result( HANDLE *async_handle, NTSTATUS status, ULON
|
|||
extern NTSTATUS unixcall_wine_dbg_write( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS unixcall_wine_server_call( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS unixcall_wine_server_fd_to_handle( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS unixcall_wine_server_handle_to_fd( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS unixcall_wine_spawnvp( void *args ) DECLSPEC_HIDDEN;
|
||||
#ifdef _WIN64
|
||||
extern NTSTATUS wow64_wine_dbg_write( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS wow64_wine_server_call( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS wow64_wine_server_fd_to_handle( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS wow64_wine_server_handle_to_fd( void *args ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS wow64_wine_spawnvp( void *args ) DECLSPEC_HIDDEN;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -39,6 +39,14 @@ struct wine_server_fd_to_handle_params
|
|||
HANDLE *handle;
|
||||
};
|
||||
|
||||
struct wine_server_handle_to_fd_params
|
||||
{
|
||||
HANDLE handle;
|
||||
unsigned int access;
|
||||
int *unix_fd;
|
||||
unsigned int *options;
|
||||
};
|
||||
|
||||
struct wine_spawnvp_params
|
||||
{
|
||||
char **argv;
|
||||
|
@ -65,6 +73,7 @@ enum ntdll_unix_funcs
|
|||
unix_wine_dbg_write,
|
||||
unix_wine_server_call,
|
||||
unix_wine_server_fd_to_handle,
|
||||
unix_wine_server_handle_to_fd,
|
||||
unix_wine_spawnvp,
|
||||
unix_system_time_precise,
|
||||
};
|
||||
|
|
|
@ -944,20 +944,6 @@ NTSTATUS WINAPI wow64_wine_nt_to_unix_file_name( UINT *args )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* wow64_wine_server_handle_to_fd
|
||||
*/
|
||||
NTSTATUS WINAPI wow64_wine_server_handle_to_fd( UINT *args )
|
||||
{
|
||||
HANDLE handle = get_handle( &args );
|
||||
ACCESS_MASK access = get_ulong( &args );
|
||||
int *unix_fd = get_ptr( &args );
|
||||
unsigned int *options = get_ptr( &args );
|
||||
|
||||
return wine_server_handle_to_fd( handle, access, unix_fd, options );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* wow64_wine_unix_to_nt_file_name
|
||||
*/
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#ifndef __WOW64_STRUCT32_H
|
||||
#define __WOW64_STRUCT32_H
|
||||
|
||||
#include "wine/server.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Length;
|
||||
|
|
|
@ -258,7 +258,6 @@
|
|||
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
|
||||
SYSCALL_ENTRY( NtYieldExecution ) \
|
||||
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
|
||||
SYSCALL_ENTRY( wine_server_handle_to_fd ) \
|
||||
SYSCALL_ENTRY( wine_unix_to_nt_file_name )
|
||||
|
||||
#endif /* __WOW64_SYSCALL_H */
|
||||
|
|
Loading…
Reference in a new issue