Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
46d0da53
Commit
46d0da53
authored
Feb 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace the wine_server_handle_to_fd() syscall by a Unix call.
parent
6d27bcbe
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
19 deletions
+53
-19
loader.c
dlls/ntdll/loader.c
+11
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
loader.c
dlls/ntdll/unix/loader.c
+2
-1
server.c
dlls/ntdll/unix/server.c
+28
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-0
unixlib.h
dlls/ntdll/unixlib.h
+9
-0
file.c
dlls/wow64/file.c
+0
-14
struct32.h
dlls/wow64/struct32.h
+0
-2
syscall.h
dlls/wow64/syscall.h
+0
-1
No files found.
dlls/ntdll/loader.c
View file @
46d0da53
...
@@ -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.@)
*/
*/
...
...
dlls/ntdll/ntdll.spec
View file @
46d0da53
...
@@ -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)
...
...
dlls/ntdll/unix/loader.c
View file @
46d0da53
...
@@ -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
,
};
};
...
...
dlls/ntdll/unix/server.c
View file @
46d0da53
...
@@ -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 */
dlls/ntdll/unix/unix_private.h
View file @
46d0da53
...
@@ -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
...
...
dlls/ntdll/unixlib.h
View file @
46d0da53
...
@@ -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
,
};
};
...
...
dlls/wow64/file.c
View file @
46d0da53
...
@@ -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
)
...
...
dlls/wow64/struct32.h
View file @
46d0da53
...
@@ -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
;
...
...
dlls/wow64/syscall.h
View file @
46d0da53
...
@@ -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 */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment