Commit 46d0da53 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Replace the wine_server_handle_to_fd() syscall by a Unix call.

parent 6d27bcbe
...@@ -3231,6 +3231,17 @@ NTSTATUS CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned i ...@@ -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, &params );
}
/****************************************************************** /******************************************************************
* LdrLoadDll (NTDLL.@) * LdrLoadDll (NTDLL.@)
*/ */
......
...@@ -1690,7 +1690,7 @@ ...@@ -1690,7 +1690,7 @@
# Server interface # Server interface
@ cdecl -norelay wine_server_call(ptr) @ cdecl -norelay wine_server_call(ptr)
@ cdecl wine_server_fd_to_handle(long long long 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 # Unix interface
@ stdcall __wine_unix_call(int64 long ptr) @ stdcall __wine_unix_call(int64 long ptr)
......
...@@ -358,7 +358,6 @@ static void * const syscalls[] = ...@@ -358,7 +358,6 @@ static void * const syscalls[] =
NtWriteVirtualMemory, NtWriteVirtualMemory,
NtYieldExecution, NtYieldExecution,
wine_nt_to_unix_file_name, wine_nt_to_unix_file_name,
wine_server_handle_to_fd,
wine_unix_to_nt_file_name, wine_unix_to_nt_file_name,
}; };
...@@ -2060,6 +2059,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] = ...@@ -2060,6 +2059,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
unixcall_wine_dbg_write, unixcall_wine_dbg_write,
unixcall_wine_server_call, unixcall_wine_server_call,
unixcall_wine_server_fd_to_handle, unixcall_wine_server_fd_to_handle,
unixcall_wine_server_handle_to_fd,
unixcall_wine_spawnvp, unixcall_wine_spawnvp,
system_time_precise, system_time_precise,
}; };
...@@ -2080,6 +2080,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = ...@@ -2080,6 +2080,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
wow64_wine_dbg_write, wow64_wine_dbg_write,
wow64_wine_server_call, wow64_wine_server_call,
wow64_wine_server_fd_to_handle, wow64_wine_server_fd_to_handle,
wow64_wine_server_handle_to_fd,
wow64_wine_spawnvp, wow64_wine_spawnvp,
system_time_precise, system_time_precise,
}; };
......
...@@ -1133,6 +1133,17 @@ NTSTATUS CDECL wine_server_handle_to_fd( HANDLE handle, unsigned int access, int ...@@ -1133,6 +1133,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 * server_pipe
* *
* Create a pipe for communicating with the server. * Create a pipe for communicating with the server.
...@@ -1846,4 +1857,21 @@ NTSTATUS wow64_wine_server_fd_to_handle( void *args ) ...@@ -1846,4 +1857,21 @@ NTSTATUS wow64_wine_server_fd_to_handle( void *args )
return ret; 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 */ #endif /* _WIN64 */
...@@ -286,11 +286,13 @@ extern void set_async_direct_result( HANDLE *async_handle, NTSTATUS status, ULON ...@@ -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_dbg_write( void *args ) DECLSPEC_HIDDEN;
extern NTSTATUS unixcall_wine_server_call( 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_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; extern NTSTATUS unixcall_wine_spawnvp( void *args ) DECLSPEC_HIDDEN;
#ifdef _WIN64 #ifdef _WIN64
extern NTSTATUS wow64_wine_dbg_write( void *args ) DECLSPEC_HIDDEN; 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_call( void *args ) DECLSPEC_HIDDEN;
extern NTSTATUS wow64_wine_server_fd_to_handle( 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; extern NTSTATUS wow64_wine_spawnvp( void *args ) DECLSPEC_HIDDEN;
#endif #endif
......
...@@ -39,6 +39,14 @@ struct wine_server_fd_to_handle_params ...@@ -39,6 +39,14 @@ struct wine_server_fd_to_handle_params
HANDLE *handle; HANDLE *handle;
}; };
struct wine_server_handle_to_fd_params
{
HANDLE handle;
unsigned int access;
int *unix_fd;
unsigned int *options;
};
struct wine_spawnvp_params struct wine_spawnvp_params
{ {
char **argv; char **argv;
...@@ -65,6 +73,7 @@ enum ntdll_unix_funcs ...@@ -65,6 +73,7 @@ enum ntdll_unix_funcs
unix_wine_dbg_write, unix_wine_dbg_write,
unix_wine_server_call, unix_wine_server_call,
unix_wine_server_fd_to_handle, unix_wine_server_fd_to_handle,
unix_wine_server_handle_to_fd,
unix_wine_spawnvp, unix_wine_spawnvp,
unix_system_time_precise, unix_system_time_precise,
}; };
......
...@@ -945,20 +945,6 @@ NTSTATUS WINAPI wow64_wine_nt_to_unix_file_name( UINT *args ) ...@@ -945,20 +945,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 * wow64_wine_unix_to_nt_file_name
*/ */
NTSTATUS WINAPI wow64_wine_unix_to_nt_file_name( UINT *args ) NTSTATUS WINAPI wow64_wine_unix_to_nt_file_name( UINT *args )
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#ifndef __WOW64_STRUCT32_H #ifndef __WOW64_STRUCT32_H
#define __WOW64_STRUCT32_H #define __WOW64_STRUCT32_H
#include "wine/server.h"
typedef struct typedef struct
{ {
ULONG Length; ULONG Length;
......
...@@ -258,7 +258,6 @@ ...@@ -258,7 +258,6 @@
SYSCALL_ENTRY( NtWriteVirtualMemory ) \ SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtYieldExecution ) \ SYSCALL_ENTRY( NtYieldExecution ) \
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \ SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
SYSCALL_ENTRY( wine_server_handle_to_fd ) \
SYSCALL_ENTRY( wine_unix_to_nt_file_name ) SYSCALL_ENTRY( wine_unix_to_nt_file_name )
#endif /* __WOW64_SYSCALL_H */ #endif /* __WOW64_SYSCALL_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment