Commit 4e772228 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Move the window and system dir variables to directory.c

parent c9689897
......@@ -153,6 +153,9 @@ static int show_dot_files = -1;
/* at some point we may want to allow Winelib apps to set this */
static const int is_case_sensitive = FALSE;
UNICODE_STRING windows_dir = { 0, 0, NULL }; /* windows directory */
UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */
static RTL_CRITICAL_SECTION dir_section;
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
......@@ -1835,6 +1838,18 @@ not_found:
}
/***********************************************************************
* DIR_init_windows_dir
*/
void DIR_init_windows_dir( const WCHAR *win, const WCHAR *sys )
{
/* FIXME: should probably store paths as NT file names */
RtlCreateUnicodeString( &windows_dir, win );
RtlCreateUnicodeString( &system_dir, sys );
}
/******************************************************************************
* get_dos_device
*
......
......@@ -98,9 +98,6 @@ static UINT tls_module_count; /* number of modules with TLS directory */
static UINT tls_total_size; /* total size of TLS storage */
static const IMAGE_TLS_DIRECTORY **tls_dirs; /* array of TLS directories */
UNICODE_STRING windows_dir = { 0, 0, NULL }; /* windows directory */
UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */
static RTL_CRITICAL_SECTION loader_section;
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
......@@ -2654,8 +2651,7 @@ void CDECL __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
PLIST_ENTRY mark, entry;
LPWSTR buffer, p;
RtlCreateUnicodeString( &windows_dir, windir );
RtlCreateUnicodeString( &system_dir, sysdir );
DIR_init_windows_dir( windir, sysdir );
strcpyW( user_shared_data->NtSystemRoot, windir );
/* prepend the system dir to the name of the already created modules */
......
......@@ -139,6 +139,7 @@ extern NTSTATUS TAPE_DeviceIoControl(HANDLE hDevice,
/* file I/O */
extern NTSTATUS FILE_GetNtStatus(void);
extern void DIR_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir );
extern BOOL DIR_is_hidden_file( const UNICODE_STRING *name );
extern NTSTATUS DIR_unmount_device( HANDLE handle );
extern NTSTATUS DIR_get_unix_cwd( char **cwd );
......
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