Rebase against 54b2a10659871032720df31ae9ca6cba2ff4acf0.

This commit is contained in:
Zebediah Figura
2020-07-14 18:10:39 -05:00
parent 3acacd0ee1
commit 103195f07d
10 changed files with 65 additions and 126 deletions

View File

@@ -1,4 +1,4 @@
From 2ea24b967a65e0bc736625abf496fa29607d74d7 Mon Sep 17 00:00:00 2001
From ee7a43bf36722acba4c870409fc15ea5bdf4a80b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 26 May 2017 05:17:17 +0200
Subject: [PATCH] ntdll: Implement opening files through nt device paths.
@@ -63,10 +63,10 @@ index 6164b0c4bde..6610edbd042 100644
static void open_file_test(void)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index aae715521a5..89219a88113 100644
index b6529241739..74f3f707444 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -3294,7 +3294,7 @@ static NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, char *
@@ -3250,7 +3250,7 @@ static NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, char *
* element doesn't have to exist; in that case STATUS_NO_SUCH_FILE is
* returned, but the unix name is still filled in properly.
*/
@@ -75,7 +75,7 @@ index aae715521a5..89219a88113 100644
{
static const WCHAR unixW[] = {'u','n','i','x'};
static const WCHAR pipeW[] = {'p','i','p','e'};
@@ -3432,6 +3432,126 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, char *nam
@@ -3387,6 +3387,126 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, char *nam
return status;
}
@@ -181,7 +181,7 @@ index aae715521a5..89219a88113 100644
+
+ name_len = sizeof(dosprefixW) + wcslen(prefix) * sizeof(WCHAR) +
+ nameW->Length - offset * sizeof(WCHAR) + sizeof(WCHAR);
+ if (!(name = RtlAllocateHeap( GetProcessHeap(), 0, name_len )))
+ if (!(name = malloc( name_len )))
+ return STATUS_NO_MEMORY;
+
+ ptr = name;
@@ -196,7 +196,7 @@ index aae715521a5..89219a88113 100644
+ dospathW.Length = wcslen( name ) * sizeof(WCHAR);
+ status = nt_to_unix_file_name_internal( &dospathW, unix_name_ret, disposition );
+
+ RtlFreeHeap( GetProcessHeap(), 0, name );
+ free( name );
+ return status;
+}