Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6d27bcbe
Commit
6d27bcbe
authored
Feb 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace the wine_server_fd_to_handle() syscall by a Unix call.
parent
8a3ba513
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
23 deletions
+59
-23
loader.c
dlls/ntdll/loader.c
+12
-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
+33
-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
-20
syscall.h
dlls/wow64/syscall.h
+0
-1
No files found.
dlls/ntdll/loader.c
View file @
6d27bcbe
...
@@ -3219,6 +3219,18 @@ unsigned int CDECL wine_server_call( void *req_ptr )
...
@@ -3219,6 +3219,18 @@ unsigned int CDECL wine_server_call( void *req_ptr )
}
}
/***********************************************************************
* wine_server_fd_to_handle
*/
NTSTATUS
CDECL
wine_server_fd_to_handle
(
int
fd
,
unsigned
int
access
,
unsigned
int
attributes
,
HANDLE
*
handle
)
{
struct
wine_server_fd_to_handle_params
params
=
{
fd
,
access
,
attributes
,
handle
};
return
WINE_UNIX_CALL
(
unix_wine_server_fd_to_handle
,
&
params
);
}
/******************************************************************
/******************************************************************
* LdrLoadDll (NTDLL.@)
* LdrLoadDll (NTDLL.@)
*/
*/
...
...
dlls/ntdll/ntdll.spec
View file @
6d27bcbe
...
@@ -1689,7 +1689,7 @@
...
@@ -1689,7 +1689,7 @@
# Server interface
# Server interface
@ cdecl -norelay wine_server_call(ptr)
@ cdecl -norelay wine_server_call(ptr)
@ cdecl
-syscall
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 -syscall wine_server_handle_to_fd(long long ptr ptr)
# Unix interface
# Unix interface
...
...
dlls/ntdll/unix/loader.c
View file @
6d27bcbe
...
@@ -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_fd_to_handle
,
wine_server_handle_to_fd
,
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[] =
unwind_builtin_dll
,
unwind_builtin_dll
,
unixcall_wine_dbg_write
,
unixcall_wine_dbg_write
,
unixcall_wine_server_call
,
unixcall_wine_server_call
,
unixcall_wine_server_fd_to_handle
,
unixcall_wine_spawnvp
,
unixcall_wine_spawnvp
,
system_time_precise
,
system_time_precise
,
};
};
...
@@ -2079,6 +2079,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
...
@@ -2079,6 +2079,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
wow64_unwind_builtin_dll
,
wow64_unwind_builtin_dll
,
wow64_wine_dbg_write
,
wow64_wine_dbg_write
,
wow64_wine_server_call
,
wow64_wine_server_call
,
wow64_wine_server_fd_to_handle
,
wow64_wine_spawnvp
,
wow64_wine_spawnvp
,
system_time_precise
,
system_time_precise
,
};
};
...
...
dlls/ntdll/unix/server.c
View file @
6d27bcbe
...
@@ -1103,6 +1103,17 @@ NTSTATUS CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned i
...
@@ -1103,6 +1103,17 @@ NTSTATUS CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned i
/***********************************************************************
/***********************************************************************
* unixcall_wine_server_fd_to_handle
*/
NTSTATUS
unixcall_wine_server_fd_to_handle
(
void
*
args
)
{
struct
wine_server_fd_to_handle_params
*
params
=
args
;
return
wine_server_fd_to_handle
(
params
->
fd
,
params
->
access
,
params
->
attributes
,
params
->
handle
);
}
/***********************************************************************
* wine_server_handle_to_fd
* wine_server_handle_to_fd
*
*
* Retrieve the file descriptor corresponding to a file handle.
* Retrieve the file descriptor corresponding to a file handle.
...
@@ -1813,4 +1824,26 @@ NTSTATUS wow64_wine_server_call( void *args )
...
@@ -1813,4 +1824,26 @@ NTSTATUS wow64_wine_server_call( void *args )
return
status
;
return
status
;
}
}
/***********************************************************************
* wow64_wine_server_fd_to_handle
*/
NTSTATUS
wow64_wine_server_fd_to_handle
(
void
*
args
)
{
struct
{
int
fd
;
unsigned
int
access
;
unsigned
int
attributes
;
ULONG
handle
;
}
const
*
params32
=
args
;
ULONG
*
handle32
=
ULongToPtr
(
params32
->
handle
);
HANDLE
handle
;
NTSTATUS
ret
;
ret
=
wine_server_fd_to_handle
(
params32
->
fd
,
params32
->
access
,
params32
->
attributes
,
&
handle
);
*
handle32
=
HandleToULong
(
handle
);
return
ret
;
}
#endif
/* _WIN64 */
#endif
/* _WIN64 */
dlls/ntdll/unix/unix_private.h
View file @
6d27bcbe
...
@@ -285,10 +285,12 @@ extern void set_async_direct_result( HANDLE *async_handle, NTSTATUS status, ULON
...
@@ -285,10 +285,12 @@ 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_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_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wow64_wine_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
#endif
#endif
...
...
dlls/ntdll/unixlib.h
View file @
6d27bcbe
...
@@ -31,6 +31,14 @@ struct wine_dbg_write_params
...
@@ -31,6 +31,14 @@ struct wine_dbg_write_params
unsigned
int
len
;
unsigned
int
len
;
};
};
struct
wine_server_fd_to_handle_params
{
int
fd
;
unsigned
int
access
;
unsigned
int
attributes
;
HANDLE
*
handle
;
};
struct
wine_spawnvp_params
struct
wine_spawnvp_params
{
{
char
**
argv
;
char
**
argv
;
...
@@ -56,6 +64,7 @@ enum ntdll_unix_funcs
...
@@ -56,6 +64,7 @@ enum ntdll_unix_funcs
unix_unwind_builtin_dll
,
unix_unwind_builtin_dll
,
unix_wine_dbg_write
,
unix_wine_dbg_write
,
unix_wine_server_call
,
unix_wine_server_call
,
unix_wine_server_fd_to_handle
,
unix_wine_spawnvp
,
unix_wine_spawnvp
,
unix_system_time_precise
,
unix_system_time_precise
,
};
};
...
...
dlls/wow64/file.c
View file @
6d27bcbe
...
@@ -945,26 +945,6 @@ NTSTATUS WINAPI wow64_wine_nt_to_unix_file_name( UINT *args )
...
@@ -945,26 +945,6 @@ NTSTATUS WINAPI wow64_wine_nt_to_unix_file_name( UINT *args )
/**********************************************************************
/**********************************************************************
* wow64_wine_server_fd_to_handle
*/
NTSTATUS
WINAPI
wow64_wine_server_fd_to_handle
(
UINT
*
args
)
{
int
fd
=
get_ulong
(
&
args
);
ACCESS_MASK
access
=
get_ulong
(
&
args
);
ULONG
attributes
=
get_ulong
(
&
args
);
ULONG
*
handle_ptr
=
get_ptr
(
&
args
);
HANDLE
handle
=
0
;
NTSTATUS
status
;
*
handle_ptr
=
0
;
status
=
wine_server_fd_to_handle
(
fd
,
access
,
attributes
,
&
handle
);
put_handle
(
handle_ptr
,
handle
);
return
status
;
}
/**********************************************************************
* wow64_wine_server_handle_to_fd
* wow64_wine_server_handle_to_fd
*/
*/
NTSTATUS
WINAPI
wow64_wine_server_handle_to_fd
(
UINT
*
args
)
NTSTATUS
WINAPI
wow64_wine_server_handle_to_fd
(
UINT
*
args
)
...
...
dlls/wow64/syscall.h
View file @
6d27bcbe
...
@@ -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_fd_to_handle ) \
SYSCALL_ENTRY( wine_server_handle_to_fd ) \
SYSCALL_ENTRY( wine_server_handle_to_fd ) \
SYSCALL_ENTRY( wine_unix_to_nt_file_name )
SYSCALL_ENTRY( wine_unix_to_nt_file_name )
...
...
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