From 5d30a5655f83424cefe9c084e682af6a09da830d Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 22 Mar 2022 10:46:29 +1100 Subject: [PATCH] Rebase against 429325b6891bbb7488b3e8d8f97e4abb92879ce7. --- ...ment-sortkey-generation-on-official-.patch | 12 ++--- ...storing-DOS-attributes-in-NtSetInfor.patch | 48 +++++++++---------- ...t-for-FileFsFullSizeInformation-clas.patch | 30 ++++++------ patches/patchinstall.sh | 2 +- ...-Print-process-arguments-in-info-thr.patch | 28 ++++++----- staging/upstream-commit | 2 +- 6 files changed, 62 insertions(+), 60 deletions(-) diff --git a/patches/libs-Unicode_Collation/0001-kernelbase-Implement-sortkey-generation-on-official-.patch b/patches/libs-Unicode_Collation/0001-kernelbase-Implement-sortkey-generation-on-official-.patch index 5740a6bf..d1a39914 100644 --- a/patches/libs-Unicode_Collation/0001-kernelbase-Implement-sortkey-generation-on-official-.patch +++ b/patches/libs-Unicode_Collation/0001-kernelbase-Implement-sortkey-generation-on-official-.patch @@ -1,4 +1,4 @@ -From bd39095de661aa8bef068e6cc7403000d66876f1 Mon Sep 17 00:00:00 2001 +From b7da069fa1681f8ef532fa77ff27ca6002f48dfa Mon Sep 17 00:00:00 2001 From: Fabian Maurer Date: Fri, 10 Apr 2020 18:47:18 +0200 Subject: [PATCH] kernelbase: Implement sortkey generation on official tables @@ -10,10 +10,10 @@ Signed-off-by: Fabian Maurer 2 files changed, 413 insertions(+), 123 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c -index ee9aad33312..c95ff8f19ba 100644 +index ad644cf5a3e..3f608996bba 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c -@@ -2560,6 +2560,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f +@@ -2564,6 +2564,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f lstrlenW(symbols_stripped) + 1, ret); ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name); @@ -27,7 +27,7 @@ index ee9aad33312..c95ff8f19ba 100644 /* test srclen = 0 */ SetLastError(0xdeadbeef); ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf)); -@@ -2989,6 +2996,135 @@ static void test_sorting(void) +@@ -2993,6 +3000,135 @@ static void test_sorting(void) } } @@ -163,8 +163,8 @@ index ee9aad33312..c95ff8f19ba 100644 static void test_FoldStringA(void) { int ret, i, j; -@@ -7194,6 +7330,7 @@ START_TEST(locale) - test_NLSVersion(); +@@ -7248,6 +7384,7 @@ START_TEST(locale) + test_locale_nls(); test_geo_name(); test_sorting(); + test_unicode_sorting(); diff --git a/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch b/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch index e3cfc936..a4ff3290 100644 --- a/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch +++ b/patches/ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch @@ -1,4 +1,4 @@ -From 06af804bd6e75332dd2be2005b443e285bc4f2dc Mon Sep 17 00:00:00 2001 +From 49f8ae15c8065c9133e0c08eaba68049cdb85e0b Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 00:08:52 -0600 Subject: [PATCH] ntdll: Implement storing DOS attributes in @@ -6,54 +6,54 @@ Subject: [PATCH] ntdll: Implement storing DOS attributes in --- dlls/ntdll/tests/file.c | 8 ++--- - dlls/ntdll/unix/file.c | 76 +++++++++++++++++++++++++++++------------ - 2 files changed, 59 insertions(+), 25 deletions(-) + dlls/ntdll/unix/file.c | 74 ++++++++++++++++++++++++++++++----------- + 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 19ae5f2ac21..cb578ceee9e 100644 +index 4014b395b56..ad718fab828 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -1400,7 +1400,7 @@ static void test_file_basic_information(void) +@@ -1401,7 +1401,7 @@ static void test_file_basic_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); -- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes ); -+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fbi.FileAttributes ); +- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes ); ++ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fbi.FileAttributes ); /* Then HIDDEN */ memset(&fbi, 0, sizeof(fbi)); -@@ -1413,7 +1413,7 @@ static void test_file_basic_information(void) +@@ -1414,7 +1414,7 @@ static void test_file_basic_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); -- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes ); -+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fbi.FileAttributes ); +- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes ); ++ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fbi.FileAttributes ); /* Check NORMAL last of all (to make sure we can clear attributes) */ memset(&fbi, 0, sizeof(fbi)); -@@ -1470,7 +1470,7 @@ static void test_file_all_information(void) +@@ -1471,7 +1471,7 @@ static void test_file_all_information(void) memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res); -- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes ); -+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes ); +- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes ); ++ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes ); /* Then HIDDEN */ memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); -@@ -1483,7 +1483,7 @@ static void test_file_all_information(void) +@@ -1484,7 +1484,7 @@ static void test_file_all_information(void) memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); -- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes ); -+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes ); +- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes ); ++ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes ); /* Check NORMAL last of all (to make sure we can clear attributes) */ memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index a2cae9708db..9a1bd50c695 100644 +index a3520898d57..cd53ca36238 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -374,6 +374,26 @@ NTSTATUS errno_to_status( int err ) +@@ -362,6 +362,26 @@ NTSTATUS errno_to_status( int err ) #define XATTR_USER_PREFIX "user." #endif @@ -80,7 +80,7 @@ index a2cae9708db..9a1bd50c695 100644 static int xattr_get( const char *path, const char *name, void *value, size_t size ) { #if defined(HAVE_ATTR_XATTR_H) -@@ -1520,6 +1540,39 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON +@@ -1508,6 +1528,39 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON } @@ -120,7 +120,7 @@ index a2cae9708db..9a1bd50c695 100644 /* get the stat info and file attributes for a file (by name) */ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) { -@@ -4356,7 +4409,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -4359,7 +4412,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, case FileBasicInformation: if (len >= sizeof(FILE_BASIC_INFORMATION)) { @@ -128,11 +128,10 @@ index a2cae9708db..9a1bd50c695 100644 const FILE_BASIC_INFORMATION *info = ptr; LARGE_INTEGER mtime, atime; -@@ -4369,26 +4421,8 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, - if (atime.QuadPart || mtime.QuadPart) +@@ -4373,25 +4425,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, status = set_file_times( fd, &mtime, &atime ); -- if (status == STATUS_SUCCESS && info->FileAttributes) + if (status == STATUS_SUCCESS && info->FileAttributes) - { - if (fstat( fd, &st ) == -1) status = errno_to_status( errno ); - else @@ -152,11 +151,10 @@ index a2cae9708db..9a1bd50c695 100644 - if (fchmod( fd, st.st_mode ) == -1) status = errno_to_status( errno ); - } - } -+ if (status == STATUS_SUCCESS && info->FileAttributes) + status = fd_set_file_info( fd, info->FileAttributes ); if (needs_close) close( fd ); } -- -2.30.2 +2.35.1 diff --git a/patches/ntdll-FileFsFullSizeInformation/0001-ntdll-Add-support-for-FileFsFullSizeInformation-clas.patch b/patches/ntdll-FileFsFullSizeInformation/0001-ntdll-Add-support-for-FileFsFullSizeInformation-clas.patch index 2e10588d..a314cecc 100644 --- a/patches/ntdll-FileFsFullSizeInformation/0001-ntdll-Add-support-for-FileFsFullSizeInformation-clas.patch +++ b/patches/ntdll-FileFsFullSizeInformation/0001-ntdll-Add-support-for-FileFsFullSizeInformation-clas.patch @@ -1,4 +1,4 @@ -From 9b99e441e86ac54a15dc54802db7c739ae729bb8 Mon Sep 17 00:00:00 2001 +From 7ed5fbcd72130a3190e4070185baba8d53a07b3c Mon Sep 17 00:00:00 2001 From: Jianqiu Zhang Date: Fri, 17 Apr 2015 14:33:41 +0800 Subject: [PATCH] ntdll: Add support for FileFsFullSizeInformation class in @@ -10,28 +10,28 @@ Subject: [PATCH] ntdll: Add support for FileFsFullSizeInformation class in 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index bff3b18ce83..5dcb7a2729a 100644 +index fffe7caa583..fbe5c9deb6e 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -1291,7 +1291,7 @@ static void test_file_full_size_information(void) +@@ -1292,7 +1292,7 @@ static void test_file_full_size_information(void) /* Assume No Quota Settings configured on Wine Testbot */ res = pNtQueryVolumeInformationFile(h, &io, &ffsi, sizeof ffsi, FileFsFullSizeInformation); -- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res); -+ ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res); +- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res); ++ ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res); res = pNtQueryVolumeInformationFile(h, &io, &fsi, sizeof fsi, FileFsSizeInformation); - ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res); + ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res); -@@ -1307,8 +1307,6 @@ static void test_file_full_size_information(void) - ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %d\n",fsi.BytesPerSector); - ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %d\n",fsi.SectorsPerAllocationUnit); +@@ -1308,8 +1308,6 @@ static void test_file_full_size_information(void) + ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %ld\n",fsi.BytesPerSector); + ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %ld\n",fsi.SectorsPerAllocationUnit); - todo_wine - { ok(ffsi.TotalAllocationUnits.QuadPart > 0, "[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n", wine_dbgstr_longlong(ffsi.TotalAllocationUnits.QuadPart)); -@@ -1326,14 +1324,10 @@ static void test_file_full_size_information(void) +@@ -1327,14 +1325,10 @@ static void test_file_full_size_information(void) "[ffsi] CallerAvailableAllocationUnits error fsi:0x%s, ffsi: 0x%s\n", wine_dbgstr_longlong(fsi.AvailableAllocationUnits.QuadPart), wine_dbgstr_longlong(ffsi.CallerAvailableAllocationUnits.QuadPart)); @@ -40,17 +40,17 @@ index bff3b18ce83..5dcb7a2729a 100644 /* Assume file system is NTFS */ - todo_wine - { - ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %d\n",ffsi.BytesPerSector); - ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %d\n",ffsi.SectorsPerAllocationUnit); + ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %ld\n",ffsi.BytesPerSector); + ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %ld\n",ffsi.SectorsPerAllocationUnit); - } CloseHandle( h ); } diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 5f7ed799c53..d7f91b41324 100644 +index 549b0a26240..d0f8be6c309 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -7518,8 +7518,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io +@@ -7524,8 +7524,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io break; case FileFsFullSizeInformation: @@ -113,5 +113,5 @@ index 5f7ed799c53..d7f91b41324 100644 case FileFsObjectIdInformation: -- -2.30.2 +2.35.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 9c849c41..14574cea 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "47b02e8c1ea4ad82cd572dc3dcf60af753222f39" + echo "429325b6891bbb7488b3e8d8f97e4abb92879ce7" } # Show version information diff --git a/patches/winedbg-Process_Arguments/0001-programs-winedbg-Print-process-arguments-in-info-thr.patch b/patches/winedbg-Process_Arguments/0001-programs-winedbg-Print-process-arguments-in-info-thr.patch index 19cd38b2..1f5050d7 100644 --- a/patches/winedbg-Process_Arguments/0001-programs-winedbg-Print-process-arguments-in-info-thr.patch +++ b/patches/winedbg-Process_Arguments/0001-programs-winedbg-Print-process-arguments-in-info-thr.patch @@ -1,17 +1,17 @@ -From 255c073514b8870677b58c88006dae6cb519f4c6 Mon Sep 17 00:00:00 2001 +From 973213adb5e132d1f2d52ba566f188e3193defb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 21 Jan 2017 17:23:48 +0100 Subject: [PATCH] winedbg: Print process arguments in info threads. --- - programs/winedbg/info.c | 107 +++++++++++++++++++++++++++++++++++++++- - 1 file changed, 105 insertions(+), 2 deletions(-) + programs/winedbg/info.c | 111 ++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 107 insertions(+), 4 deletions(-) diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c -index 2b8e377e6f4..68b2c440df0 100644 +index bb933aeb455..b7aeb58fe9a 100644 --- a/programs/winedbg/info.c +++ b/programs/winedbg/info.c -@@ -581,6 +581,103 @@ static BOOL get_process_name(DWORD pid, PROCESSENTRY32* entry) +@@ -581,6 +581,103 @@ static BOOL get_process_name(DWORD pid, PROCESSENTRY32W* entry) return ret; } @@ -115,21 +115,25 @@ index 2b8e377e6f4..68b2c440df0 100644 void info_win32_threads(void) { HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); -@@ -609,6 +706,7 @@ void info_win32_threads(void) +@@ -607,8 +704,9 @@ void info_win32_threads(void) + */ + if (entry.th32OwnerProcessID != lastProcessId) { - PROCESSENTRY32 pcs_entry; - const char* exename; +- PROCESSENTRY32W pcs_entry; +- const WCHAR* exename; ++ PROCESSENTRY32 pcs_entry; ++ const char* exename; + char *args; p = dbg_get_process(entry.th32OwnerProcessID); if (p) @@ -618,8 +716,13 @@ void info_win32_threads(void) else - exename = ""; + exename = L""; -- dbg_printf("%08lx%s %s\n", +- dbg_printf("%08lx%s %ls\n", - entry.th32OwnerProcessID, p ? " (D)" : "", exename); -+ dbg_printf("%08lx%s %s\n", entry.th32OwnerProcessID, p ? " (D)" : "", exename); ++ dbg_printf("%08lx%s %ls\n", entry.th32OwnerProcessID, p ? " (D)" : "", exename); + args = get_process_args(entry.th32OwnerProcessID); + if (args) + { @@ -140,5 +144,5 @@ index 2b8e377e6f4..68b2c440df0 100644 } t = dbg_get_thread(p, entry.th32ThreadID); -- -2.34.1 +2.35.1 diff --git a/staging/upstream-commit b/staging/upstream-commit index 70f3dc43..1c0f6279 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -47b02e8c1ea4ad82cd572dc3dcf60af753222f39 +429325b6891bbb7488b3e8d8f97e4abb92879ce7