Alexandre Julliard : ntdll: Use syscalls for the file path conversion functions.
Alexandre Julliard
julliard at winehq.org
Tue Aug 25 16:16:57 CDT 2020
Module: wine
Branch: master
Commit: 482b64effd44a8f601d3327eed84ce6d61432cf3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=482b64effd44a8f601d3327eed84ce6d61432cf3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Aug 25 13:57:02 2020 +0200
ntdll: Use syscalls for the file path conversion functions.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/directory.c | 16 ----------------
dlls/ntdll/ntdll.spec | 4 ++--
dlls/ntdll/path.c | 11 +----------
dlls/ntdll/unix/loader.c | 2 --
dlls/ntdll/unixlib.h | 5 +----
5 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index dbfba303b2..39641e9d4d 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -83,22 +83,6 @@ void init_directories(void)
}
-/******************************************************************************
- * wine_nt_to_unix_file_name (NTDLL.@) Not a Windows API
- *
- * Convert a file name from NT namespace to Unix namespace.
- *
- * If disposition is not FILE_OPEN or FILE_OVERWRITE, the last path
- * element doesn't have to exist; in that case STATUS_NO_SUCH_FILE is
- * returned, but the unix name is still filled in properly.
- */
-NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, char *nameA, SIZE_T *size,
- UINT disposition )
-{
- return unix_funcs->nt_to_unix_file_name( nameW, nameA, size, disposition );
-}
-
-
/******************************************************************
* RtlWow64EnableFsRedirection (NTDLL.@)
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 8a1890ac09..77fa53f245 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1609,5 +1609,5 @@
@ cdecl __wine_get_unix_codepage()
# Filesystem
-@ cdecl wine_nt_to_unix_file_name(ptr ptr ptr long)
-@ cdecl wine_unix_to_nt_file_name(str ptr ptr)
+@ cdecl -syscall wine_nt_to_unix_file_name(ptr ptr ptr long)
+@ cdecl -syscall wine_unix_to_nt_file_name(str ptr ptr)
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 5f2d379071..53470b4f35 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -555,7 +555,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
for (;;)
{
if (!(nt_str = RtlAllocateHeap( GetProcessHeap(), 0, buflen * sizeof(WCHAR) ))) break;
- status = unix_funcs->unix_to_nt_file_name( unix_name, nt_str, &buflen );
+ status = wine_unix_to_nt_file_name( unix_name, nt_str, &buflen );
if (status != STATUS_BUFFER_TOO_SMALL) break;
RtlFreeHeap( GetProcessHeap(), 0, nt_str );
}
@@ -892,12 +892,3 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
RtlReleasePebLock();
return nts;
}
-
-
-/******************************************************************
- * wine_unix_to_nt_file_name (NTDLL.@) Not a Windows API
- */
-NTSTATUS CDECL wine_unix_to_nt_file_name( const char *name, WCHAR *buffer, SIZE_T *size )
-{
- return unix_funcs->unix_to_nt_file_name( name, buffer, size );
-}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 8ce7b22ddd..800d6bf57b 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1354,8 +1354,6 @@ static struct unix_funcs unix_funcs =
virtual_release_address_space,
exec_process,
server_init_process_done,
- wine_nt_to_unix_file_name,
- wine_unix_to_nt_file_name,
set_show_dot_files,
load_so_dll,
load_builtin_dll,
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 1c48864a0e..22ccb0911b 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -28,7 +28,7 @@ struct msghdr;
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 95
+#define NTDLL_UNIXLIB_VERSION 96
struct unix_funcs
{
@@ -96,9 +96,6 @@ struct unix_funcs
void (CDECL *server_init_process_done)( void *relay );
/* file functions */
- NTSTATUS (CDECL *nt_to_unix_file_name)( const UNICODE_STRING *nameW, char *nameA, SIZE_T *size,
- UINT disposition );
- NTSTATUS (CDECL *unix_to_nt_file_name)( const char *name, WCHAR *buffer, SIZE_T *size );
void (CDECL *set_show_dot_files)( BOOL enable );
/* loader functions */
More information about the wine-cvs
mailing list