You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 2ad09b01673381261815bfc804a2f69ce4d85f86.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
From 4de8fc9d34056aeb3307fa104bec6ca2c7748d2e Mon Sep 17 00:00:00 2001
|
||||
From f3eb2b6b5484dbcc56717263e28d8eff529b8386 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 16:02:05 -0600
|
||||
Subject: kernel32: Implement CreateSymbolicLink[A|W] with ntdll reparse
|
||||
points.
|
||||
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
|
||||
reparse points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -161,7 +161,7 @@ index f49af6d5bfe..bc2cd84a65d 100644
|
||||
+ test_CreateSymbolicLink();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index b265866ac54..caec31ce602 100644
|
||||
index 7d0c4d63aa8..c9781c17d2b 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -282,10 +282,10 @@ index b265866ac54..caec31ce602 100644
|
||||
|
||||
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index ed632a27df2..bd2e8550d05 100644
|
||||
index 54d959b694c..38f5a960521 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1615,15 +1615,14 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1596,15 +1596,14 @@ static void test_tr2_sys__Stat(void)
|
||||
char const *path;
|
||||
enum file_type ret;
|
||||
int err_code;
|
||||
@@ -306,9 +306,9 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
+ { "tr2_test_dir\\f1_link" , regular_file, ERROR_SUCCESS },
|
||||
+ { "tr2_test_dir\\dir_link", directory_file, ERROR_SUCCESS },
|
||||
};
|
||||
WCHAR testW[] = {'t','r','2','_','t','e','s','t','_','d','i','r',0};
|
||||
WCHAR testW2[] = {'t','r','2','_','t','e','s','t','_','d','i','r','/','f','1',0};
|
||||
@@ -1668,16 +1667,14 @@ static void test_tr2_sys__Stat(void)
|
||||
|
||||
CreateDirectoryA("tr2_test_dir", NULL);
|
||||
@@ -1647,16 +1646,14 @@ static void test_tr2_sys__Stat(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
err_code = 0xdeadbeef;
|
||||
val = p_tr2_sys__Stat(tests[i].path, &err_code);
|
||||
@@ -327,7 +327,7 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
ok(tests[i].err_code == err_code, "tr2_sys__Lstat(): test %d err_code expect: %d, got %d\n",
|
||||
i+1, tests[i].err_code, err_code);
|
||||
}
|
||||
@@ -1692,8 +1689,8 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1671,8 +1668,8 @@ static void test_tr2_sys__Stat(void)
|
||||
ok(ERROR_SUCCESS == err_code, "tr2_sys__Lstat_wchar(): err_code expect ERROR_SUCCESS, got %d\n", err_code);
|
||||
|
||||
if(ret) {
|
||||
@@ -338,7 +338,7 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
}
|
||||
ok(DeleteFileA("tr2_test_dir/f1"), "expect tr2_test_dir/f1 to exist\n");
|
||||
ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n");
|
||||
@@ -1923,16 +1920,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1901,16 +1898,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
char const *existing_path;
|
||||
char const *new_path;
|
||||
int last_error;
|
||||
@@ -363,7 +363,7 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
};
|
||||
|
||||
ret = p_tr2_sys__Make_dir("tr2_test_dir");
|
||||
@@ -1957,18 +1953,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1935,18 +1931,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
}
|
||||
|
||||
ok(errno == 0xdeadbeef, "tr2_sys__Symlink(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno);
|
||||
@@ -388,7 +388,7 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
ret = p_tr2_sys__Remove_dir("tr2_test_dir");
|
||||
ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret);
|
||||
}
|
||||
@@ -1982,15 +1977,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -1960,15 +1955,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
struct {
|
||||
char const *path;
|
||||
int last_error;
|
||||
@@ -411,7 +411,7 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
};
|
||||
|
||||
GetCurrentDirectoryA(MAX_PATH, current_path);
|
||||
@@ -2019,9 +2013,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -1997,9 +1991,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
errno = 0xdeadbeef;
|
||||
ret = p_tr2_sys__Unlink(tests[i].path);
|
||||
@@ -424,35 +424,35 @@ index ed632a27df2..bd2e8550d05 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
|
||||
index 751b1beed86..382f5732c29 100644
|
||||
index ae21feaf9e4..c10e925f8b3 100644
|
||||
--- a/dlls/msvcp140/tests/msvcp140.c
|
||||
+++ b/dlls/msvcp140/tests/msvcp140.c
|
||||
@@ -803,16 +803,15 @@ static void test_Stat(void)
|
||||
@@ -784,16 +784,15 @@ static void test_Stat(void)
|
||||
WCHAR const *path;
|
||||
enum file_type ret;
|
||||
int perms;
|
||||
- int is_todo;
|
||||
} tests[] = {
|
||||
- { NULL, file_not_found, 0xdeadbeef, FALSE },
|
||||
- { test_dirW, directory_file, 0777, FALSE },
|
||||
- { test_f1W, regular_file, 0777, FALSE },
|
||||
- { test_f2W, regular_file, 0555, FALSE },
|
||||
- { test_neW, file_not_found, 0xdeadbeef, FALSE },
|
||||
- { test_invW, file_not_found, 0xdeadbeef, FALSE },
|
||||
- { test_f1_linkW, regular_file, 0777, TRUE },
|
||||
- { test_dir_linkW, directory_file, 0777, TRUE },
|
||||
- { L"wine_test_dir", directory_file, 0777, FALSE },
|
||||
- { L"wine_test_dir/f1", regular_file, 0777, FALSE },
|
||||
- { L"wine_test_dir/f2", regular_file, 0555, FALSE },
|
||||
- { L"wine_test_dir/ne", file_not_found, 0xdeadbeef, FALSE },
|
||||
- { L"wine_test_dir\\??invalid_name>>", file_not_found, 0xdeadbeef, FALSE },
|
||||
- { L"wine_test_dir\\f1_link", regular_file, 0777, TRUE },
|
||||
- { L"wine_test_dir\\dir_link", directory_file, 0777, TRUE },
|
||||
+ { NULL, file_not_found, 0xdeadbeef },
|
||||
+ { test_dirW, directory_file, 0777 },
|
||||
+ { test_f1W, regular_file, 0777 },
|
||||
+ { test_f2W, regular_file, 0555 },
|
||||
+ { test_neW, file_not_found, 0xdeadbeef },
|
||||
+ { test_invW, file_not_found, 0xdeadbeef },
|
||||
+ { test_f1_linkW, regular_file, 0777 },
|
||||
+ { test_dir_linkW, directory_file, 0777 },
|
||||
+ { L"wine_test_dir", directory_file, 0777 },
|
||||
+ { L"wine_test_dir/f1", regular_file, 0777 },
|
||||
+ { L"wine_test_dir/f2", regular_file, 0555 },
|
||||
+ { L"wine_test_dir/ne", file_not_found, 0xdeadbeef },
|
||||
+ { L"wine_test_dir\\??invalid_name>>", file_not_found, 0xdeadbeef },
|
||||
+ { L"wine_test_dir\\f1_link", regular_file, 0777 },
|
||||
+ { L"wine_test_dir\\dir_link", directory_file, 0777 },
|
||||
};
|
||||
|
||||
GetCurrentDirectoryW(MAX_PATH, origin_path);
|
||||
@@ -867,26 +866,20 @@ static void test_Stat(void)
|
||||
@@ -851,26 +850,20 @@ static void test_Stat(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
perms = 0xdeadbeef;
|
||||
val = p_Stat(tests[i].path, &perms);
|
||||
@@ -487,41 +487,42 @@ index 751b1beed86..382f5732c29 100644
|
||||
}
|
||||
|
||||
GetSystemDirectoryW(sys_path, MAX_PATH);
|
||||
@@ -898,8 +891,8 @@ static void test_Stat(void)
|
||||
@@ -882,9 +875,9 @@ static void test_Stat(void)
|
||||
ok(perms == expected_perms, "_Stat(): perms expect: 0%o, got 0%o\n", expected_perms, perms);
|
||||
|
||||
if(ret) {
|
||||
- todo_wine ok(DeleteFileW(test_f1_linkW), "expect wine_test_dir/f1_link to exist\n");
|
||||
- todo_wine ok(RemoveDirectoryW(test_dir_linkW), "expect wine_test_dir/dir_link to exist\n");
|
||||
+ ok(DeleteFileW(test_f1_linkW), "expect wine_test_dir/f1_link to exist\n");
|
||||
+ ok(RemoveDirectoryW(test_dir_linkW), "expect wine_test_dir/dir_link to exist\n");
|
||||
- todo_wine ok(DeleteFileW(L"wine_test_dir\\f1_link"),
|
||||
+ ok(DeleteFileW(L"wine_test_dir\\f1_link"),
|
||||
"expect wine_test_dir/f1_link to exist\n");
|
||||
- todo_wine ok(RemoveDirectoryW(L"wine_test_dir\\dir_link"),
|
||||
+ ok(RemoveDirectoryW(L"wine_test_dir\\dir_link"),
|
||||
"expect wine_test_dir/dir_link to exist\n");
|
||||
}
|
||||
ok(DeleteFileW(test_f1W), "expect wine_test_dir/f1 to exist\n");
|
||||
SetFileAttributesW(test_f2W, FILE_ATTRIBUTE_NORMAL);
|
||||
@@ -1044,15 +1037,14 @@ static void test_Unlink(void)
|
||||
ok(DeleteFileW(L"wine_test_dir/f1"), "expect wine_test_dir/f1 to exist\n");
|
||||
@@ -1003,15 +996,14 @@ static void test_Unlink(void)
|
||||
struct {
|
||||
WCHAR const *path;
|
||||
int last_error;
|
||||
- MSVCP_bool is_todo;
|
||||
} tests[] = {
|
||||
- { f1_symlinkW, ERROR_SUCCESS, TRUE },
|
||||
- { f1_linkW, ERROR_SUCCESS, FALSE },
|
||||
- { f1W, ERROR_SUCCESS, FALSE },
|
||||
- { wine_test_dirW, ERROR_ACCESS_DENIED, FALSE },
|
||||
- { not_existW, ERROR_FILE_NOT_FOUND, FALSE },
|
||||
- { not_exist_fileW, ERROR_PATH_NOT_FOUND, FALSE },
|
||||
- { L"wine_test_dir\\f1_symlink", ERROR_SUCCESS, TRUE },
|
||||
- { L"wine_test_dir\\f1_link", ERROR_SUCCESS, FALSE },
|
||||
- { L"wine_test_dir\\f1", ERROR_SUCCESS, FALSE },
|
||||
- { L"wine_test_dir", ERROR_ACCESS_DENIED, FALSE },
|
||||
- { L"not_exist", ERROR_FILE_NOT_FOUND, FALSE },
|
||||
- { L"not_exist_dir\\not_exist_file", ERROR_PATH_NOT_FOUND, FALSE },
|
||||
- { NULL, ERROR_PATH_NOT_FOUND, FALSE }
|
||||
+ { f1_symlinkW, ERROR_SUCCESS },
|
||||
+ { f1_linkW, ERROR_SUCCESS },
|
||||
+ { f1W, ERROR_SUCCESS },
|
||||
+ { wine_test_dirW, ERROR_ACCESS_DENIED },
|
||||
+ { not_existW, ERROR_FILE_NOT_FOUND },
|
||||
+ { not_exist_fileW, ERROR_PATH_NOT_FOUND },
|
||||
+ { L"wine_test_dir\\f1_symlink", ERROR_SUCCESS },
|
||||
+ { L"wine_test_dir\\f1_link", ERROR_SUCCESS },
|
||||
+ { L"wine_test_dir\\f1", ERROR_SUCCESS },
|
||||
+ { L"wine_test_dir", ERROR_ACCESS_DENIED },
|
||||
+ { L"not_exist", ERROR_FILE_NOT_FOUND },
|
||||
+ { L"not_exist_dir\\not_exist_file", ERROR_PATH_NOT_FOUND },
|
||||
+ { NULL, ERROR_PATH_NOT_FOUND }
|
||||
};
|
||||
|
||||
GetCurrentDirectoryW(MAX_PATH, current_path);
|
||||
@@ -1081,9 +1073,8 @@ static void test_Unlink(void)
|
||||
@@ -1040,9 +1032,8 @@ static void test_Unlink(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
errno = 0xdeadbeef;
|
||||
ret = p_Unlink(tests[i].path);
|
||||
@@ -534,5 +535,5 @@ index 751b1beed86..382f5732c29 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 6eed7c952dbb0e7151723881dc26e955b9d9595d Mon Sep 17 00:00:00 2001
|
||||
From 4878d1414a8fa7c87d59625488a7ad0bb64e5e62 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 15:18:50 -0600
|
||||
Subject: wcmd: Display reparse point type in directory listings.
|
||||
Subject: [PATCH] wcmd: Display reparse point type in directory listings.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -9,11 +9,11 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
|
||||
index 2d35f8eb1d1..5b7416ce72a 100644
|
||||
index 24b18bfa81b..523139d5fe0 100644
|
||||
--- a/programs/cmd/directory.c
|
||||
+++ b/programs/cmd/directory.c
|
||||
@@ -400,6 +400,32 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
||||
WCMD_output(L"%1!*s!", cur_width - tmp_width, nullW);
|
||||
@@ -395,6 +395,32 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
||||
WCMD_output(L"%1!*s!", cur_width - tmp_width, L"");
|
||||
}
|
||||
|
||||
+ } else if (fd[i].dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||
@@ -30,13 +30,13 @@ index 2d35f8eb1d1..5b7416ce72a 100644
|
||||
+ break;
|
||||
+ }
|
||||
+ WCMD_output (L"%1!10s! %2!8s! %3!-14s!", datestring, timestring, type);
|
||||
+ if (shortname) WCMD_output (fmt2, fd[i].cAlternateFileName);
|
||||
+ if (usernames) WCMD_output (fmt3, username);
|
||||
+ WCMD_output(fmt4,fd[i].cFileName);
|
||||
+ if (shortname) WCMD_output (L"%1!-13s!", fd[i].cAlternateFileName);
|
||||
+ if (usernames) WCMD_output (L"%1!-23s!", username);
|
||||
+ WCMD_output(L"%1",fd[i].cFileName);
|
||||
+ } else {
|
||||
+ if (!((lstrcmpW(fd[i].cFileName, dotW) == 0) ||
|
||||
+ (lstrcmpW(fd[i].cFileName, dotdotW) == 0))) {
|
||||
+ WCMD_output (fmt5, recurse?inputparms->dirName:nullW, fd[i].cFileName);
|
||||
+ if (!((lstrcmpW(fd[i].cFileName, L".") == 0) ||
|
||||
+ (lstrcmpW(fd[i].cFileName, L"..") == 0))) {
|
||||
+ WCMD_output (L"%1%2", recurse?inputparms->dirName : L"", fd[i].cFileName);
|
||||
+ } else {
|
||||
+ addNewLine = FALSE;
|
||||
+ }
|
||||
@@ -46,5 +46,5 @@ index 2d35f8eb1d1..5b7416ce72a 100644
|
||||
dir_count++;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 73ac626fc54665899c44bbfa11f22e4877480796 Mon Sep 17 00:00:00 2001
|
||||
From 99e0d91c314c2463e7e44599173ba383423fc1b9 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 15:38:30 -0600
|
||||
Subject: wcmd: Show reparse point target in directory listing.
|
||||
Subject: [PATCH] wcmd: Show reparse point target in directory listing.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
programs/cmd/directory.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
programs/cmd/directory.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
|
||||
index 5b7416ce72a..6769491b888 100644
|
||||
index 658eb93e5b4..1b548d56a48 100644
|
||||
--- a/programs/cmd/directory.c
|
||||
+++ b/programs/cmd/directory.c
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -21,18 +21,10 @@ index 5b7416ce72a..6769491b888 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
|
||||
|
||||
@@ -256,6 +258,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
||||
static const WCHAR fmt3[] = {'%','1','!','-','2','3','s','!','\0'};
|
||||
static const WCHAR fmt4[] = {'%','1','\0'};
|
||||
static const WCHAR fmt5[] = {'%','1','%','2','\0'};
|
||||
+ static const WCHAR fmt6[] = {' ','[','%','1',']','\0'};
|
||||
|
||||
dir_count = 0;
|
||||
file_count = 0;
|
||||
@@ -417,6 +420,39 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
||||
if (shortname) WCMD_output (fmt2, fd[i].cAlternateFileName);
|
||||
if (usernames) WCMD_output (fmt3, username);
|
||||
WCMD_output(fmt4,fd[i].cFileName);
|
||||
@@ -412,6 +414,39 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
||||
if (shortname) WCMD_output (L"%1!-13s!", fd[i].cAlternateFileName);
|
||||
if (usernames) WCMD_output (L"%1!-23s!", username);
|
||||
WCMD_output(L"%1",fd[i].cFileName);
|
||||
+ if (fd[i].dwReserved0) {
|
||||
+ REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
+ WCHAR *target = NULL;
|
||||
@@ -63,12 +55,12 @@ index 5b7416ce72a..6769491b888 100644
|
||||
+ }
|
||||
+ }
|
||||
+ CloseHandle(hlink);
|
||||
+ if (target) WCMD_output(fmt6, target);
|
||||
+ if (target) WCMD_output(L" [%1]", target);
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+ }
|
||||
} else {
|
||||
if (!((lstrcmpW(fd[i].cFileName, dotW) == 0) ||
|
||||
(lstrcmpW(fd[i].cFileName, dotdotW) == 0))) {
|
||||
if (!((lstrcmpW(fd[i].cFileName, L".") == 0) ||
|
||||
(lstrcmpW(fd[i].cFileName, L"..") == 0))) {
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
Reference in New Issue
Block a user