mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
ntdll-Junction_Points: Fix compile warning on x86_64.
This commit is contained in:
parent
20c3485cf8
commit
6b60ac392a
@ -1,19 +1,19 @@
|
||||
From 295b74af626b2870ff5f6923d7138f0c0ccb7346 Mon Sep 17 00:00:00 2001
|
||||
From 63d7c7a66fcf9a64547dcedc7297153b4232368d Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:00:21 -0700
|
||||
Subject: ntdll: Add support for deleting junction points.
|
||||
|
||||
---
|
||||
dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/tests/file.c | 23 ++++++++++++++++++++++
|
||||
dlls/ntdll/tests/file.c | 22 +++++++++++++++++++++
|
||||
include/ntifs.h | 11 +++++++++++
|
||||
3 files changed, 85 insertions(+)
|
||||
3 files changed, 84 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 6e73547..7abbc89 100644
|
||||
index 85f037a..70ed339 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -1781,6 +1781,41 @@ cleanup:
|
||||
@@ -1778,6 +1778,41 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ index 6e73547..7abbc89 100644
|
||||
/**************************************************************************
|
||||
* NtFsControlFile [NTDLL.@]
|
||||
* ZwFsControlFile [NTDLL.@]
|
||||
@@ -1936,6 +1971,22 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
|
||||
@@ -1933,6 +1968,22 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
|
||||
status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
@ -79,10 +79,10 @@ index 6e73547..7abbc89 100644
|
||||
{
|
||||
REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index e07e6a8..b9aa665 100644
|
||||
index 070f6ed..c21691f 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -4298,12 +4298,15 @@ static void test_junction_points(void)
|
||||
@@ -4265,12 +4265,15 @@ static void test_junction_points(void)
|
||||
static const WCHAR junctionW[] = {'\\','j','u','n','c','t','i','o','n',0};
|
||||
WCHAR path[MAX_PATH], junction_path[MAX_PATH], target_path[MAX_PATH];
|
||||
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
|
||||
@ -98,7 +98,7 @@ index e07e6a8..b9aa665 100644
|
||||
UNICODE_STRING nameW;
|
||||
HANDLE hJunction;
|
||||
WCHAR *dest;
|
||||
@@ -4351,6 +4354,8 @@ static void test_junction_points(void)
|
||||
@@ -4318,6 +4321,8 @@ static void test_junction_points(void)
|
||||
win_skip("Failed to open junction point directory handle (0x%x).\n", GetLastError());
|
||||
goto cleanup;
|
||||
}
|
||||
@ -107,7 +107,7 @@ index e07e6a8..b9aa665 100644
|
||||
buffer_len = build_reparse_buffer(nameW.Buffer, &buffer);
|
||||
bret = DeviceIoControl(hJunction, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
|
||||
@@ -4365,6 +4370,24 @@ static void test_junction_points(void)
|
||||
@@ -4332,6 +4337,23 @@ static void test_junction_points(void)
|
||||
ok(bret, "Failed to read junction point!\n");
|
||||
ok((memcmp(dest, nameW.Buffer, string_len) == 0), "Junction point destination does not match ('%s' != '%s')!\n",
|
||||
wine_dbgstr_w(dest), wine_dbgstr_w(nameW.Buffer));
|
||||
@ -127,8 +127,7 @@ index e07e6a8..b9aa665 100644
|
||||
+ ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%x).\n", dwret);
|
||||
+ /* conversion bug: we see 0x1c9c380deadbee6 on Wine */
|
||||
+ todo_wine ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
|
||||
+ "Junction point folder's access time does not match (0x%llx != 0x%llx).\n",
|
||||
+ new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
+ "Junction point folder's access time does not match.\n");
|
||||
CloseHandle(hJunction);
|
||||
|
||||
cleanup:
|
||||
@ -155,5 +154,5 @@ index db07c28..cb8638b 100644
|
||||
|
||||
#endif /* __WINE_NTIFS_H */
|
||||
--
|
||||
2.6.1
|
||||
2.7.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b36e62b1765283f503c2ef42b10a139955949c86 Mon Sep 17 00:00:00 2001
|
||||
From 63ede7d3be89603d63c228072c6c3fe7a50ea3e8 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:02:11 -0700
|
||||
Subject: kernel32,ntdll: Add support for deleting junction points with
|
||||
@ -10,10 +10,10 @@ Subject: kernel32,ntdll: Add support for deleting junction points with
|
||||
2 files changed, 47 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 22d21c5..63901d2 100644
|
||||
index 5847a84..58a4c38 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1583,6 +1583,7 @@ BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path, LPSECURITY_ATTRI
|
||||
@@ -1630,6 +1630,7 @@ BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path, LPSECURITY_ATTRI
|
||||
*/
|
||||
BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
{
|
||||
@ -21,7 +21,7 @@ index 22d21c5..63901d2 100644
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
UNICODE_STRING nt_name;
|
||||
ANSI_STRING unix_name;
|
||||
@@ -1616,15 +1617,21 @@ BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
@@ -1663,15 +1664,21 @@ BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
}
|
||||
|
||||
status = wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE );
|
||||
@ -51,10 +51,10 @@ index 22d21c5..63901d2 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 965ca62..acc9197 100644
|
||||
index 174d48a..f7b7d48 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -2714,7 +2714,7 @@ static void test_junction_points(void)
|
||||
@@ -4271,7 +4271,7 @@ static void test_junction_points(void)
|
||||
REPARSE_GUID_DATA_BUFFER guid_buffer;
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
@ -63,8 +63,8 @@ index 965ca62..acc9197 100644
|
||||
INT buffer_len, string_len;
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
@@ -2805,6 +2805,38 @@ static void test_junction_points(void)
|
||||
new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
@@ -4361,6 +4361,38 @@ static void test_junction_points(void)
|
||||
"Junction point folder's access time does not match.\n");
|
||||
CloseHandle(hJunction);
|
||||
|
||||
+ /* Check deleting a junction point as if it were a directory */
|
||||
@ -103,5 +103,5 @@ index 965ca62..acc9197 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString( &nameW );
|
||||
--
|
||||
1.9.1
|
||||
2.7.1
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 7af8c509b8c528f70077743c4127f2ce0acd8315 Mon Sep 17 00:00:00 2001
|
||||
From 7f97bca6c4153b373afbc621916d339d44e9241d Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:03:47 -0700
|
||||
Subject: kernel32: Advertise junction point support.
|
||||
|
||||
---
|
||||
dlls/kernel32/volume.c | 3 ++-
|
||||
dlls/ntdll/tests/file.c | 7 +++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
dlls/kernel32/volume.c | 3 ++-
|
||||
dlls/ntdll/tests/file.c | 5 ++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c
|
||||
index d396764..0fb0aef 100644
|
||||
index 4f01c99..4f11e09 100644
|
||||
--- a/dlls/kernel32/volume.c
|
||||
+++ b/dlls/kernel32/volume.c
|
||||
@@ -854,7 +854,8 @@ fill_fs_info: /* now fill in the information that depends on the file system ty
|
||||
@ -23,23 +23,21 @@ index d396764..0fb0aef 100644
|
||||
}
|
||||
ret = TRUE;
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index acc9197..3112081 100644
|
||||
index f7b7d48..3091283 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -2799,10 +2799,9 @@ static void test_junction_points(void)
|
||||
@@ -4356,9 +4356,8 @@ static void test_junction_points(void)
|
||||
memset(&new_attrib, 0x00, sizeof(new_attrib));
|
||||
dwret = NtQueryInformationFile(hJunction, &iosb, &new_attrib, sizeof(new_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%x).\n", dwret);
|
||||
- /* conversion bug: we see 0x1c9c380deadbee6 on Wine */
|
||||
- todo_wine ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
|
||||
- "Junction point folder's access time does not match (0x%llx != 0x%llx).\n",
|
||||
- new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
- "Junction point folder's access time does not match.\n");
|
||||
+ ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
|
||||
+ "Junction point folder's access time does not match (0x%llx != 0x%llx).\n",
|
||||
+ new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
+ "Junction point folder's access time does not match.\n");
|
||||
CloseHandle(hJunction);
|
||||
|
||||
/* Check deleting a junction point as if it were a directory */
|
||||
--
|
||||
1.7.9.5
|
||||
2.7.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user