From e380c1e9a7cbfa8b1ebeda1ddad841c1e4c3cc27 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 23 Oct 2019 09:40:18 +1100 Subject: [PATCH] Rebase against d82f06c07556408e9584d2a1f8b275df39c93d74 --- ...ediag-message-to-show-warning-that-t.patch | 12 ++-- ...-include-Add-restrictederrorinfo.idl.patch | 68 ------------------ ...t-for-hiding-wine-version-informatio.patch | 26 +++---- ...ll-Fill-process-kernel-and-user-time.patch | 26 +++---- ...ss-virtual-memory-counters-in-NtQuer.patch | 24 +++---- ...to-update-user-shared-data-into-a-se.patch | 18 ++--- ...ead-to-update-user_shared_data-time-.patch | 57 ++++++++------- patches/patchinstall.sh | 13 +--- ...he-stream-position-in-addition-to-th.patch | 58 --------------- ...-MediaSeeking_GetCurrentPosition-on-.patch | 71 ------------------- ...pi-Implement-SetupAddToDiskSpaceList.patch | 38 +++++----- ...ment-SetupQueryDrivesInDiskSpaceList.patch | 34 ++++----- ...lementSetupAddSectionToDiskSpaceList.patch | 34 ++++----- ...nt-SetupAddInstallSectionToDiskSpace.patch | 33 +++++---- 14 files changed, 153 insertions(+), 359 deletions(-) delete mode 100644 patches/combase-GetRestrictedErrorInfo/0001-include-Add-restrictederrorinfo.idl.patch delete mode 100644 patches/quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch delete mode 100644 patches/quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch diff --git a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch index 610748fe..cfba7ed2 100644 --- a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch +++ b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch @@ -1,4 +1,4 @@ -From ee1533db82fa2a955765b6a00f5300900350d2fe Mon Sep 17 00:00:00 2001 +From 9e585de1f2f28e1ef18c1edca875779c491375cb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 2 Oct 2014 19:44:31 +0200 Subject: [PATCH] kernel32: Add winediag message to show warning, that this @@ -9,7 +9,7 @@ Subject: [PATCH] kernel32: Add winediag message to show warning, that this 1 file changed, 10 insertions(+) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 0a3fd70..206224f 100644 +index 36ed82bff8c..b8a677c5485 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -65,6 +65,7 @@ @@ -18,9 +18,9 @@ index 0a3fd70..206224f 100644 WINE_DECLARE_DEBUG_CHANNEL(relay); +WINE_DECLARE_DEBUG_CHANNEL(winediag); - #ifdef __APPLE__ - extern char **__wine_get_main_environment(void); -@@ -1090,6 +1091,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) + typedef struct + { +@@ -997,6 +998,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) __TRY { @@ -37,5 +37,5 @@ index 0a3fd70..206224f 100644 being_debugged = FALSE; -- -1.9.1 +2.23.0 diff --git a/patches/combase-GetRestrictedErrorInfo/0001-include-Add-restrictederrorinfo.idl.patch b/patches/combase-GetRestrictedErrorInfo/0001-include-Add-restrictederrorinfo.idl.patch deleted file mode 100644 index 51c76c08..00000000 --- a/patches/combase-GetRestrictedErrorInfo/0001-include-Add-restrictederrorinfo.idl.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e72b9a5931139e2d4c651e62f9b5ac226af2bedd Mon Sep 17 00:00:00 2001 -From: Louis Lenders -Date: Mon, 8 Apr 2019 08:26:43 +0200 -Subject: [PATCH 1/2] include: Add restrictederrorinfo.idl. - -Signed-off-by: Louis Lenders ---- - include/Makefile.in | 1 + - include/restrictederrorinfo.idl | 35 +++++++++++++++++++++++++++++++++++ - 2 files changed, 36 insertions(+) - create mode 100644 include/restrictederrorinfo.idl - -diff --git a/include/Makefile.in b/include/Makefile.in -index b03b967..5bc8dde 100644 ---- a/include/Makefile.in -+++ b/include/Makefile.in -@@ -545,6 +545,7 @@ SOURCES = \ - reason.h \ - regstr.h \ - restartmanager.h \ -+ restrictederrorinfo.idl \ - richedit.h \ - richole.idl \ - rmxfguid.h \ -diff --git a/include/restrictederrorinfo.idl b/include/restrictederrorinfo.idl -new file mode 100644 -index 0000000..e444256 ---- /dev/null -+++ b/include/restrictederrorinfo.idl -@@ -0,0 +1,35 @@ -+/* -+ * Copyright 2019 Louis Lenders -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+import "oaidl.idl"; -+ -+[ -+ object, -+ uuid(82ba7092-4c88-427d-a7bc-16dd93feb67e), -+ pointer_default(unique) -+] -+interface IRestrictedErrorInfo : IUnknown -+{ -+ HRESULT GetErrorDetails ( -+ [out] BSTR *desc, -+ [out] HRESULT *error, -+ [out] BSTR *restricted_desc, -+ [out] BSTR *sid); -+ -+ HRESULT GetReference ([out] BSTR *reference); -+} --- -1.9.1 - diff --git a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch index 14d9d5a9..1783fc86 100644 --- a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch +++ b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch @@ -1,4 +1,4 @@ -From e319578c8c47d7a2f7303f39de7f20e0d10e6675 Mon Sep 17 00:00:00 2001 +From f13c148654c044ac15de82d43febf6469340e922 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 30 May 2015 02:23:15 +0200 Subject: [PATCH] ntdll: Add support for hiding wine version information from @@ -10,18 +10,18 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 174569d3cf..2dc0202b36 100644 +index 4400b7ecbe8..9cb5ed420bf 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -68,6 +68,7 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); - const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', - 's','y','s','t','e','m','3','2','\\',0}; +@@ -70,6 +70,7 @@ const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', + const WCHAR syswow64_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', + 's','y','s','w','o','w','6','4','\\',0}; + /* system search path */ static const WCHAR system_path[] = {'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m','3','2',';', -@@ -76,6 +77,9 @@ static const WCHAR system_path[] = +@@ -78,6 +79,9 @@ static const WCHAR system_path[] = static const WCHAR dotW[] = {'.',0}; @@ -31,7 +31,7 @@ index 174569d3cf..2dc0202b36 100644 static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */ static int free_lib_count; /* recursion depth of LdrUnloadDll calls */ -@@ -92,6 +96,8 @@ struct dll_dir_entry +@@ -94,6 +98,8 @@ struct dll_dir_entry static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */ @@ -40,7 +40,7 @@ index 174569d3cf..2dc0202b36 100644 struct ldr_notification { struct list entry; -@@ -1707,6 +1713,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) +@@ -1709,6 +1715,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) } @@ -137,7 +137,7 @@ index 174569d3cf..2dc0202b36 100644 /****************************************************************** * LdrGetProcedureAddress (NTDLL.@) */ -@@ -1727,7 +1823,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, +@@ -1729,7 +1825,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path ) : find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path ); @@ -146,7 +146,7 @@ index 174569d3cf..2dc0202b36 100644 { *address = proc; ret = STATUS_SUCCESS; -@@ -4289,6 +4385,7 @@ void __wine_process_init(void) +@@ -4291,6 +4387,7 @@ void __wine_process_init(void) NtCurrentTeb()->Peb->LoaderLock = &loader_section; update_user_process_params( &wm->ldr.FullDllName ); version_init( wm->ldr.FullDllName.Buffer ); @@ -155,10 +155,10 @@ index 174569d3cf..2dc0202b36 100644 LdrQueryImageFileExecutionOptions( &wm->ldr.FullDllName, globalflagW, REG_DWORD, diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index a111530534..e7bf510c28 100644 +index 88fed7ebcff..c7b821cbf30 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -269,6 +269,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; +@@ -270,6 +270,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); @@ -171,5 +171,5 @@ index a111530534..e7bf510c28 100644 extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN; -- -2.21.0 +2.23.0 diff --git a/patches/ntdll-ThreadTime/0003-ntdll-Fill-process-kernel-and-user-time.patch b/patches/ntdll-ThreadTime/0003-ntdll-Fill-process-kernel-and-user-time.patch index 34e8c3e5..fdfd98d1 100644 --- a/patches/ntdll-ThreadTime/0003-ntdll-Fill-process-kernel-and-user-time.patch +++ b/patches/ntdll-ThreadTime/0003-ntdll-Fill-process-kernel-and-user-time.patch @@ -1,4 +1,4 @@ -From 6416e68e4d81d9b37d24076d446115f08f99bf81 Mon Sep 17 00:00:00 2001 +From 06a283fc4f686ee3c3cf33fec4f7e7b2c3f64bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 9 Mar 2017 16:27:23 +0100 Subject: [PATCH] ntdll: Fill process kernel and user time. @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Fill process kernel and user time. 3 files changed, 57 insertions(+), 37 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c -index 2cd2ab327..c3250746b 100644 +index 91d504f90aa..9c138726d68 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c -@@ -2384,6 +2384,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( +@@ -2600,6 +2600,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( { SYSTEM_PROCESS_INFORMATION* spi = SystemInformation; SYSTEM_PROCESS_INFORMATION* last = NULL; @@ -21,7 +21,7 @@ index 2cd2ab327..c3250746b 100644 HANDLE hSnap = 0; WCHAR procname[1024]; WCHAR* exename; -@@ -2421,7 +2422,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( +@@ -2637,7 +2638,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( if (Length >= len + procstructlen) { @@ -30,7 +30,7 @@ index 2cd2ab327..c3250746b 100644 * vmCounters, ioCounters */ -@@ -2439,6 +2440,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( +@@ -2655,6 +2656,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( /* spi->ti will be set later on */ @@ -41,10 +41,10 @@ index 2cd2ab327..c3250746b 100644 len += procstructlen; } diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 3463ebd38..78831cf37 100644 +index 70707bec042..db7f00359cf 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -265,6 +265,10 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; +@@ -270,6 +270,10 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); @@ -56,13 +56,13 @@ index 3463ebd38..78831cf37 100644 int __cdecl NTDLL_tolower( int c ); int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 70320afe7..8dac11393 100644 +index c6b70c557b4..029d94d8a38 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -149,6 +149,53 @@ static ULONG_PTR get_image_addr(void) - } +@@ -153,6 +153,53 @@ static ULONG_PTR get_image_addr(void) #endif + + +BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, + LARGE_INTEGER *kernel, LARGE_INTEGER *user) @@ -111,9 +111,9 @@ index 70320afe7..8dac11393 100644 + + /*********************************************************************** - * thread_init + * set_process_name * -@@ -902,42 +949,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, +@@ -975,42 +1022,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, #ifdef __linux__ /* only /proc provides exact values for a specific thread */ if (unix_pid != -1 && unix_tid != -1) @@ -158,5 +158,5 @@ index 70320afe7..8dac11393 100644 /* get values for current process instead */ -- -2.21.0 +2.23.0 diff --git a/patches/ntdll-ThreadTime/0006-ntdll-Fill-process-virtual-memory-counters-in-NtQuer.patch b/patches/ntdll-ThreadTime/0006-ntdll-Fill-process-virtual-memory-counters-in-NtQuer.patch index 7774ea37..d677240b 100644 --- a/patches/ntdll-ThreadTime/0006-ntdll-Fill-process-virtual-memory-counters-in-NtQuer.patch +++ b/patches/ntdll-ThreadTime/0006-ntdll-Fill-process-virtual-memory-counters-in-NtQuer.patch @@ -1,4 +1,4 @@ -From d2f9bcfc14a960a4b365406a8610f9ab96f78e9b Mon Sep 17 00:00:00 2001 +From d9078607a8e6b8ff82df648b94b5340e6736b923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 9 Mar 2017 22:56:45 +0100 Subject: [PATCH] ntdll: Fill process virtual memory counters in @@ -13,10 +13,10 @@ FIXME: fill_VM_COUNTERS now uses a different method ... which one is better? 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c -index 3c2838f365e..5092b97d252 100644 +index 2b2d3df89f..a8fb48a83d 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c -@@ -2510,8 +2510,11 @@ NTSTATUS WINAPI NtQuerySystemInformation( +@@ -2561,8 +2561,11 @@ NTSTATUS WINAPI NtQuerySystemInformation( /* spi->ti will be set later on */ if (reply->unix_pid != -1) @@ -29,10 +29,10 @@ index 3c2838f365e..5092b97d252 100644 } len += procstructlen; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 40bf66f1d24..5ec14a399cc 100644 +index 425ede4486..51965eccaf 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -263,6 +263,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); +@@ -270,6 +270,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); /* process / thread time */ extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN; @@ -41,10 +41,10 @@ index 40bf66f1d24..5ec14a399cc 100644 /* string functions */ int __cdecl NTDLL_tolower( int c ); diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c -index 34051c2ef93..94e8df8d8d1 100644 +index c7e2cdb1b7..b1f529fb3d 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c -@@ -203,7 +203,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) +@@ -188,7 +188,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) { @@ -54,11 +54,11 @@ index 34051c2ef93..94e8df8d8d1 100644 #endif diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 4279ae77099..0f90291e222 100644 +index 8b6c937df2..863b337024 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -195,6 +195,42 @@ BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, - return FALSE; +@@ -314,6 +314,42 @@ void thread_init(void) + NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); } +BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) @@ -99,7 +99,7 @@ index 4279ae77099..0f90291e222 100644 +} /*********************************************************************** - * thread_init + * free_thread_data -- -2.20.1 +2.23.0 diff --git a/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch b/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch index fc485308..9b385088 100644 --- a/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch +++ b/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch @@ -1,4 +1,4 @@ -From 690b0a49ae9e8ee3935e7c4e19bcd6c637ce28d8 Mon Sep 17 00:00:00 2001 +From 74b51edf67a0b31bf8e3341a403b11387ad5801d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 26 Nov 2014 10:46:09 +0100 Subject: [PATCH] ntdll: Move code to update user shared data into a separate @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index fb01a26590d..b7dfdc44e19 100644 +index f0ac1d77b00..4003a36c8be 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1552,3 +1552,6 @@ +@@ -1574,3 +1574,6 @@ # Filesystem @ cdecl wine_nt_to_unix_file_name(ptr ptr long long) @ cdecl wine_unix_to_nt_file_name(ptr ptr) @@ -21,10 +21,10 @@ index fb01a26590d..b7dfdc44e19 100644 +# User shared data +@ cdecl __wine_user_shared_data() diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index c1d6012b4da..b6ede0d18cf 100644 +index 863b337024c..90d49f2d92e 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -245,7 +245,6 @@ void thread_init(void) +@@ -211,7 +211,6 @@ void thread_init(void) void *addr; BOOL suspend; SIZE_T size, info_size; @@ -32,7 +32,7 @@ index c1d6012b4da..b6ede0d18cf 100644 NTSTATUS status; struct ntdll_thread_data *thread_data; -@@ -333,7 +332,23 @@ void thread_init(void) +@@ -300,7 +299,23 @@ void thread_init(void) init_directories(); init_user_process_params( info_size ); @@ -57,7 +57,7 @@ index c1d6012b4da..b6ede0d18cf 100644 NtQuerySystemTime( &now ); user_shared_data->SystemTime.LowPart = now.u.LowPart; user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart; -@@ -341,10 +356,7 @@ void thread_init(void) +@@ -308,10 +323,7 @@ void thread_init(void) user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time; user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart; user_shared_data->TickCountMultiplier = 1 << 24; @@ -68,7 +68,7 @@ index c1d6012b4da..b6ede0d18cf 100644 + return (BYTE *)user_shared_data; } - + BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) -- -2.20.1 +2.23.0 diff --git a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch index 0b8ca232..e333b9e1 100644 --- a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch +++ b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch @@ -1,21 +1,21 @@ -From f3483229e702bed0791a35666237e8583f5d47b0 Mon Sep 17 00:00:00 2001 +From daa8c43bfa8584ef006f324f8009759bd4ce6d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 5 May 2017 05:40:50 +0200 Subject: [PATCH] ntdll: Create thread to update user_shared_data time values when necessary. --- - dlls/ntdll/loader.c | 31 ++++++++++++++++++++++ - dlls/ntdll/ntdll_misc.h | 3 +++ - dlls/ntdll/thread.c | 70 ++++++++++++++++++++++++++++++++++++++++++++----- - dlls/ntdll/virtual.c | 17 ++++++++++++ - 4 files changed, 114 insertions(+), 7 deletions(-) + dlls/ntdll/loader.c | 31 ++++++++++++++++++ + dlls/ntdll/ntdll_misc.h | 3 ++ + dlls/ntdll/thread.c | 71 ++++++++++++++++++++++++++++++++++++----- + dlls/ntdll/virtual.c | 17 ++++++++++ + 4 files changed, 114 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 8073434..0546478 100644 +index 9cb5ed420bf..39e122d9933 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -3340,6 +3340,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) +@@ -3815,6 +3815,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) } @@ -52,7 +52,7 @@ index 8073434..0546478 100644 /****************************************************************** * LdrInitializeThunk (NTDLL.@) * -@@ -3669,6 +3699,7 @@ void __wine_process_init(void) +@@ -4387,6 +4417,7 @@ void __wine_process_init(void) NtCurrentTeb()->Peb->LoaderLock = &loader_section; update_user_process_params( &wm->ldr.FullDllName ); version_init( wm->ldr.FullDllName.Buffer ); @@ -61,10 +61,10 @@ index 8073434..0546478 100644 virtual_set_large_address_space(); diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 0dba878..47abfba 100644 +index c7b821cbf30..6d6cccab6b5 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -194,6 +194,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; +@@ -197,6 +197,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; extern void virtual_fill_image_information( const pe_image_info_t *pe_info, SECTION_IMAGE_INFORMATION *info ) DECLSPEC_HIDDEN; extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN; @@ -75,10 +75,10 @@ index 0dba878..47abfba 100644 /* completion */ extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue, diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 0a11cfe..1c09344 100644 +index 90d49f2d92e..14f355cebb5 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -44,6 +44,7 @@ +@@ -47,6 +47,7 @@ #include "wine/library.h" #include "wine/server.h" #include "wine/debug.h" @@ -86,7 +86,7 @@ index 0a11cfe..1c09344 100644 #include "ntdll_misc.h" #include "ddk/wdm.h" #include "wine/exception.h" -@@ -54,7 +55,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(thread); +@@ -57,7 +58,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(thread); #define PTHREAD_STACK_MIN 16384 #endif @@ -97,7 +97,7 @@ index 0a11cfe..1c09344 100644 static const WCHAR default_windirW[] = {'C',':','\\','w','i','n','d','o','w','s',0}; void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL; -@@ -263,7 +266,7 @@ void thread_init(void) +@@ -227,7 +230,7 @@ void thread_init(void) MESSAGE( "wine: failed to map the shared user data: %08x\n", status ); exit(1); } @@ -106,16 +106,17 @@ index 0a11cfe..1c09344 100644 memcpy( user_shared_data->NtSystemRoot, default_windirW, sizeof(default_windirW) ); /* allocate and initialize the PEB */ -@@ -355,18 +358,71 @@ void thread_init(void) +@@ -315,17 +318,69 @@ void thread_init(void) */ BYTE* CDECL __wine_user_shared_data(void) { +- LARGE_INTEGER now; + static int spinlock; + ULARGE_INTEGER interrupt; - LARGE_INTEGER now; -+ ++ LARGE_INTEGER now; ++ + while (interlocked_cmpxchg( &spinlock, 1, 0 ) != 0); -+ ++ NtQuerySystemTime( &now ); - user_shared_data->SystemTime.LowPart = now.u.LowPart; - user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart; @@ -137,12 +138,11 @@ index 0a11cfe..1c09344 100644 + user_shared_data->u.TickCount.High1Time = interrupt.HighPart; + user_shared_data->TickCountLowDeprecated = interrupt.LowPart; user_shared_data->TickCountMultiplier = 1 << 24; -+ ++ + spinlock = 0; return (BYTE *)user_shared_data; } - +static void *user_shared_data_thread(void *arg) +{ + struct timeval tv; @@ -179,15 +179,14 @@ index 0a11cfe..1c09344 100644 + pthread_attr_destroy(&attr); +} + -+ - /*********************************************************************** - * free_thread_data - */ + BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) + { + BOOL ret = FALSE; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index da40aab..de63460 100644 +index d15b49f6fdf..186d7335bfc 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c -@@ -2013,6 +2013,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) +@@ -2088,6 +2088,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) { NTSTATUS ret = STATUS_ACCESS_VIOLATION; void *page = ROUND_ADDR( addr, page_mask ); @@ -195,7 +194,7 @@ index da40aab..de63460 100644 sigset_t sigset; BYTE vprot; -@@ -2038,7 +2039,23 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) +@@ -2113,7 +2114,23 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) ret = STATUS_SUCCESS; } } @@ -220,5 +219,5 @@ index da40aab..de63460 100644 } -- -1.9.1 +2.23.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 639b23d7..092769c2 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "98c2c9a9c98d174851fa7a87db79599dd7d8af89" + echo "d82f06c07556408e9584d2a1f8b275df39c93d74" } # Show version information @@ -2243,14 +2243,11 @@ fi # | # | Modified files: # | * dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec, dlls/api-ms-win-core-winrt-error-l1-1-1 -# | /api-ms-win-core-winrt-error-l1-1-1.spec, dlls/combase/combase.spec, dlls/combase/roapi.c, include/Makefile.in, -# | include/restrictederrorinfo.idl +# | /api-ms-win-core-winrt-error-l1-1-1.spec, dlls/combase/combase.spec, dlls/combase/roapi.c # | if test "$enable_combase_GetRestrictedErrorInfo" -eq 1; then - patch_apply combase-GetRestrictedErrorInfo/0001-include-Add-restrictederrorinfo.idl.patch patch_apply combase-GetRestrictedErrorInfo/0002-combase-Add-GetRestrictedErrorInfo-and-RoOriginateLa.patch ( - printf '%s\n' '+ { "Louis Lenders", "include: Add restrictederrorinfo.idl.", 1 },'; printf '%s\n' '+ { "Louis Lenders", "combase: Add GetRestrictedErrorInfo and RoOriginateLanguageException stubs.", 1 },'; ) >> "$patchlist" fi @@ -5410,16 +5407,12 @@ fi # Patchset quartz-MediaSeeking_Positions # | # | Modified files: -# | * dlls/quartz/filtergraph.c, dlls/strmbase/pospass.c +# | * dlls/strmbase/pospass.c # | if test "$enable_quartz_MediaSeeking_Positions" -eq 1; then patch_apply quartz-MediaSeeking_Positions/0001-strmbase-Fix-MediaSeekingPassThru_GetPositions-retur.patch - patch_apply quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch - patch_apply quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch ( printf '%s\n' '+ { "Erich E. Hoover", "strmbase: Fix MediaSeekingPassThru_GetPositions return when the pins are unconnected.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "quartz: Include the stream position in addition to the reference clock offset in the time returned by MediaSeeking_GetPositions.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "quartz: Implement MediaSeeking_GetCurrentPosition on top of MediaSeeking_GetPositions.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch b/patches/quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch deleted file mode 100644 index fd74ec8c..00000000 --- a/patches/quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch +++ /dev/null @@ -1,58 +0,0 @@ -From fb2417ad73fb67b20340a65d645b9dac245bdbf0 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Tue, 22 Jul 2014 08:26:47 -0600 -Subject: quartz: Include the stream position in addition to the reference - clock offset in the time returned by MediaSeeking_GetPositions. - ---- - dlls/quartz/filtergraph.c | 27 ++++++++++++++++++++++++--- - 1 file changed, 24 insertions(+), 3 deletions(-) - -diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c -index 771a330..ad24691 100644 ---- a/dlls/quartz/filtergraph.c -+++ b/dlls/quartz/filtergraph.c -@@ -2539,16 +2539,37 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * - return hr; - } - -+static HRESULT WINAPI found_getposition(IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pargs) -+{ -+ struct pos_args *args = (void*)pargs; -+ -+ return IMediaSeeking_GetPositions(seek, args->current, args->stop); -+} -+ - static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, - LONGLONG *pStop) - { - IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); -+ struct pos_args args; -+ LONGLONG time = 0; - HRESULT hr; - - TRACE("(%p/%p)->(%p, %p)\n", This, iface, pCurrent, pStop); -- hr = IMediaSeeking_GetCurrentPosition(iface, pCurrent); -- if (SUCCEEDED(hr)) -- hr = IMediaSeeking_GetStopPosition(iface, pStop); -+ -+ args.current = pCurrent; -+ args.stop = pStop; -+ EnterCriticalSection(&This->cs); -+ hr = all_renderers_seek(This, found_getposition, (DWORD_PTR)&args); -+ if (This->state == State_Running && This->refClock && This->start_time >= 0) -+ { -+ IReferenceClock_GetTime(This->refClock, &time); -+ if (time) -+ time -= This->start_time; -+ } -+ if (This->pause_time > 0) -+ time += This->pause_time; -+ *pCurrent += time; -+ LeaveCriticalSection(&This->cs); - - return hr; - } --- -1.7.9.5 - diff --git a/patches/quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch b/patches/quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch deleted file mode 100644 index cca0f3e9..00000000 --- a/patches/quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 5e1836cb61edfb4940ced2b9fd44efc93c2d3e82 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Tue, 22 Jul 2014 08:27:52 -0600 -Subject: quartz: Implement MediaSeeking_GetCurrentPosition on top of - MediaSeeking_GetPositions. - ---- - dlls/quartz/filtergraph.c | 40 +++++++++++++++------------------------- - 1 file changed, 15 insertions(+), 25 deletions(-) - -diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c -index ad24691..0491131 100644 ---- a/dlls/quartz/filtergraph.c -+++ b/dlls/quartz/filtergraph.c -@@ -2451,31 +2451,6 @@ static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLON - return hr; - } - --static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent) --{ -- IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); -- LONGLONG time = 0; -- -- if (!pCurrent) -- return E_POINTER; -- -- EnterCriticalSection(&This->cs); -- if (This->state == State_Running && This->refClock && This->start_time >= 0) -- { -- IReferenceClock_GetTime(This->refClock, &time); -- if (time) -- time -= This->start_time; -- } -- if (This->pause_time > 0) -- time += This->pause_time; -- *pCurrent = time; -- LeaveCriticalSection(&This->cs); -- -- TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); -- -- return S_OK; --} -- - static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *pTarget, - const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat) - { -@@ -2574,6 +2549,21 @@ static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG * - return hr; - } - -+static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent) -+{ -+ LONGLONG time; -+ HRESULT hr; -+ -+ if (!pCurrent) -+ return E_POINTER; -+ -+ hr = MediaSeeking_GetPositions(iface, pCurrent, &time); -+ -+ TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); -+ -+ return hr; -+} -+ - static HRESULT WINAPI MediaSeeking_GetAvailable(IMediaSeeking *iface, LONGLONG *pEarliest, - LONGLONG *pLatest) - { --- -1.7.9.5 - diff --git a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch index 81f7353e..ab0b4551 100644 --- a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch @@ -1,18 +1,18 @@ -From cdef6edd147384d61717cd37a83c7864db4e53dc Mon Sep 17 00:00:00 2001 +From 21c96f8d75f9596e1cd523bae1f2f54b5d2cd445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 05:02:21 +0100 -Subject: setupapi: Implement SetupAddToDiskSpaceList. +Subject: [PATCH] setupapi: Implement SetupAddToDiskSpaceList. --- - dlls/setupapi/diskspace.c | 137 +++++++++++++++++++++++++++++++--- - dlls/setupapi/tests/diskspace.c | 159 +++++++++++++++++++++++++++++++++++++++- + dlls/setupapi/diskspace.c | 137 +++++++++++++++++++++++++-- + dlls/setupapi/tests/diskspace.c | 159 +++++++++++++++++++++++++++++++- 2 files changed, 285 insertions(+), 11 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 7c33542..f945b99 100644 +index 4f047dd2b54..dcee29443d7 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c -@@ -49,7 +49,21 @@ struct space_list +@@ -48,7 +48,21 @@ struct space_list UINT flags; }; @@ -34,7 +34,7 @@ index 7c33542..f945b99 100644 /*********************************************************************** * SetupCreateDiskSpaceListW (SETUPAPI.@) -@@ -281,25 +295,128 @@ BOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC diskspace) +@@ -280,25 +294,128 @@ BOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC diskspace) } /*********************************************************************** @@ -174,7 +174,7 @@ index 7c33542..f945b99 100644 + return ret; } diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 4e87ea9..bb8c7b7 100644 +index dab6705eee3..2bdf8babce0 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -19,6 +19,7 @@ @@ -185,9 +185,9 @@ index 4e87ea9..bb8c7b7 100644 #include "windef.h" #include "winbase.h" -@@ -31,6 +32,16 @@ +@@ -29,6 +30,16 @@ - static BOOL is_win9x; + #include "wine/test.h" +static inline const char* debugstr_longlong(ULONGLONG ll) +{ @@ -202,7 +202,7 @@ index 4e87ea9..bb8c7b7 100644 static void test_SetupCreateDiskSpaceListA(void) { HDSKSPC ret; -@@ -300,11 +311,31 @@ static void test_SetupDuplicateDiskSpaceListW(void) +@@ -293,11 +304,31 @@ static void test_SetupDuplicateDiskSpaceListW(void) ok(SetupDestroyDiskSpaceList(handle), "Expected SetupDestroyDiskSpaceList to succeed\n"); } @@ -232,9 +232,9 @@ index 4e87ea9..bb8c7b7 100644 + char tmp[MAX_PATH]; + LONGLONG size; - if (is_win9x) - win_skip("SetupQuerySpaceRequiredOnDriveA crashes with NULL disk space handle on Win9x\n"); -@@ -369,7 +400,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) + SetLastError(0xdeadbeef); + ret = SetupQuerySpaceRequiredOnDriveA(NULL, NULL, NULL, NULL, 0); +@@ -357,7 +388,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ret = SetupQuerySpaceRequiredOnDriveA(handle, "", NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DRIVE, @@ -243,7 +243,7 @@ index 4e87ea9..bb8c7b7 100644 GetLastError()); SetLastError(0xdeadbeef); -@@ -381,6 +412,97 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) +@@ -369,6 +400,97 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); @@ -341,7 +341,7 @@ index 4e87ea9..bb8c7b7 100644 ok(SetupDestroyDiskSpaceList(handle), "Expected SetupDestroyDiskSpaceList to succeed\n"); } -@@ -472,6 +594,40 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) +@@ -460,6 +582,40 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) "Expected SetupDestroyDiskSpaceList to succeed\n"); } @@ -381,13 +381,13 @@ index 4e87ea9..bb8c7b7 100644 + START_TEST(diskspace) { - is_win9x = !SetupCreateDiskSpaceListW((void *)0xdeadbeef, 0xdeadbeef, 0) && -@@ -482,4 +638,5 @@ START_TEST(diskspace) + test_SetupCreateDiskSpaceListA(); +@@ -468,4 +624,5 @@ START_TEST(diskspace) test_SetupDuplicateDiskSpaceListW(); test_SetupQuerySpaceRequiredOnDriveA(); test_SetupQuerySpaceRequiredOnDriveW(); + test_SetupAddToDiskSpaceListA(); } -- -2.7.1 +2.23.0 diff --git a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch index e095d299..9691e2e7 100644 --- a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch @@ -1,19 +1,19 @@ -From 16118fd1abc95a103ff097409062abf5c3ebb592 Mon Sep 17 00:00:00 2001 +From 94dc72943a6ed74dab0e697777182b12ef1ee929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 05:03:11 +0100 -Subject: setupapi: Implement SetupQueryDrivesInDiskSpaceList. +Subject: [PATCH] setupapi: Implement SetupQueryDrivesInDiskSpaceList. --- - dlls/setupapi/diskspace.c | 85 +++++++++++++++++++++++++++++++++++++++++ - dlls/setupapi/stubs.c | 18 --------- - dlls/setupapi/tests/diskspace.c | 70 +++++++++++++++++++++++++++++++++ + dlls/setupapi/diskspace.c | 85 +++++++++++++++++++++++++++++++++ + dlls/setupapi/stubs.c | 18 ------- + dlls/setupapi/tests/diskspace.c | 70 +++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 18 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 0e589fa..378aa59d 100644 +index dcee29443d7..17873ddf957 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c -@@ -420,3 +420,88 @@ BOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC diskspace, PCSTR targetfile, +@@ -419,3 +419,88 @@ BOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC diskspace, PCSTR targetfile, if (targetfileW) HeapFree(GetProcessHeap(), 0, targetfileW); return ret; } @@ -103,13 +103,14 @@ index 0e589fa..378aa59d 100644 + return ret; +} diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c -index ffc766b..94e98af1 100644 +index 47dca6c1505..80c3a7cfd9f 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c -@@ -198,24 +198,6 @@ INT WINAPI SetupPromptReboot( HSPFILEQ file_queue, HWND owner, BOOL scan_only ) +@@ -230,24 +230,6 @@ INT WINAPI SetupPromptReboot( HSPFILEQ file_queue, HWND owner, BOOL scan_only ) + return 0; } - /*********************************************************************** +-/*********************************************************************** - * SetupQueryDrivesInDiskSpaceListA (SETUPAPI.@) - */ -BOOL WINAPI SetupQueryDrivesInDiskSpaceListA(HDSKSPC disk_space, PSTR return_buffer, DWORD return_buffer_size, PDWORD required_size) @@ -127,15 +128,14 @@ index ffc766b..94e98af1 100644 - return FALSE; -} - --/*********************************************************************** + /*********************************************************************** * SetupAddToSourceListA (SETUPAPI.@) */ - BOOL WINAPI SetupAddToSourceListA(DWORD flags, PCSTR source) diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index bb8c7b7..60087d1 100644 +index 2bdf8babce0..e39bb4eb47a 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c -@@ -628,6 +628,75 @@ static void test_SetupAddToDiskSpaceListA(void) +@@ -616,6 +616,75 @@ static void test_SetupAddToDiskSpaceListA(void) "Expected SetupDestroyDiskSpaceList to succeed\n"); } @@ -210,13 +210,13 @@ index bb8c7b7..60087d1 100644 + START_TEST(diskspace) { - is_win9x = !SetupCreateDiskSpaceListW((void *)0xdeadbeef, 0xdeadbeef, 0) && -@@ -639,4 +708,5 @@ START_TEST(diskspace) + test_SetupCreateDiskSpaceListA(); +@@ -625,4 +694,5 @@ START_TEST(diskspace) test_SetupQuerySpaceRequiredOnDriveA(); test_SetupQuerySpaceRequiredOnDriveW(); test_SetupAddToDiskSpaceListA(); + test_SetupQueryDrivesInDiskSpaceListA(); } -- -2.7.1 +2.23.0 diff --git a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch index 482831c4..5d3b7134 100644 --- a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch @@ -1,21 +1,21 @@ -From 99174b786a85040bd75c533e9ed97613b91627b4 Mon Sep 17 00:00:00 2001 +From da97aa366be1371f68736f49ec11bf401c29e3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 4 Mar 2016 04:53:00 +0100 Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList. --- - dlls/setupapi/diskspace.c | 130 +++++++++++++++++++++++++- + dlls/setupapi/diskspace.c | 130 ++++++++++++++++++++- dlls/setupapi/queue.c | 2 +- dlls/setupapi/setupapi.spec | 4 +- dlls/setupapi/setupapi_private.h | 2 + - dlls/setupapi/tests/diskspace.c | 193 +++++++++++++++++++++++++++++++++++++++ + dlls/setupapi/tests/diskspace.c | 193 +++++++++++++++++++++++++++++++ 5 files changed, 327 insertions(+), 4 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index af36dd4..73e7fbd 100644 +index 01b08c1408e..3153a18856a 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c -@@ -65,6 +65,23 @@ static LONGLONG get_file_size(WCHAR *path) +@@ -64,6 +64,23 @@ static LONGLONG get_file_size(WCHAR *path) return size.QuadPart; } @@ -39,7 +39,7 @@ index af36dd4..73e7fbd 100644 /*********************************************************************** * SetupCreateDiskSpaceListW (SETUPAPI.@) */ -@@ -165,7 +182,118 @@ HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace, PVOID Reserved1, +@@ -164,7 +181,118 @@ HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace, PVOID Reserved1, } /*********************************************************************** @@ -160,10 +160,10 @@ index af36dd4..73e7fbd 100644 BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, HINF InfHandle, HINF LayoutInfHandle, diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c -index c065c6e..b50e8cf 100644 +index f7da3a7128e..3d11d1ea8a0 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c -@@ -336,7 +336,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA +@@ -338,7 +338,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA * * Retrieve the destination dir for a given section. */ @@ -173,7 +173,7 @@ index c065c6e..b50e8cf 100644 static const WCHAR Dest[] = {'D','e','s','t','i','n','a','t','i','o','n','D','i','r','s',0}; static const WCHAR Def[] = {'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0}; diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec -index 1d18870..dd41e16 100644 +index 81256a3417c..ad8652ac93b 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -244,8 +244,8 @@ @@ -188,7 +188,7 @@ index 1d18870..dd41e16 100644 @ stdcall SetupAddToDiskSpaceListW(long wstr int64 long ptr long) @ stdcall SetupAddToSourceListA(long str) diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h -index f4685ab..4df0623 100644 +index f4685ab2b4c..4df062349cc 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -92,6 +92,8 @@ extern const WCHAR *DIRID_get_string( int dirid ) DECLSPEC_HIDDEN; @@ -201,19 +201,19 @@ index f4685ab..4df0623 100644 struct callback_WtoA_context diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 793d3a1..f40506c 100644 +index 4ba9fea9e0a..7b8bcf4a342 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c -@@ -32,6 +32,8 @@ +@@ -30,6 +30,8 @@ - static BOOL is_win9x; + #include "wine/test.h" +#define STD_HEADER "[Version]\r\nSignature=\"$CHICAGO$\"\r\n" + static inline const char* debugstr_longlong(ULONGLONG ll) { static char string[17]; -@@ -42,6 +44,18 @@ static inline const char* debugstr_longlong(ULONGLONG ll) +@@ -40,6 +42,18 @@ static inline const char* debugstr_longlong(ULONGLONG ll) return string; } @@ -232,7 +232,7 @@ index 793d3a1..f40506c 100644 static void test_SetupCreateDiskSpaceListA(void) { HDSKSPC ret; -@@ -753,6 +767,184 @@ static void test_SetupQueryDrivesInDiskSpaceListA(void) +@@ -741,6 +755,184 @@ static void test_SetupQueryDrivesInDiskSpaceListA(void) ret = SetupQueryDrivesInDiskSpaceListA(handle, buffer, sizeof(buffer), NULL); ok(ret, "Expected SetupQueryDrivesInDiskSpaceListA to succeed\n"); ok(!memcmp("f:\0g:\0x:\0\0", buffer, 10), "Device list does not match\n"); @@ -417,12 +417,12 @@ index 793d3a1..f40506c 100644 } START_TEST(diskspace) -@@ -767,4 +959,5 @@ START_TEST(diskspace) +@@ -753,4 +945,5 @@ START_TEST(diskspace) test_SetupQuerySpaceRequiredOnDriveW(); test_SetupAddToDiskSpaceListA(); test_SetupQueryDrivesInDiskSpaceListA(); + test_SetupAddSectionToDiskSpaceListA(); } -- -1.9.1 +2.23.0 diff --git a/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch b/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch index 41722b59..7c81b958 100644 --- a/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch +++ b/patches/setupapi-DiskSpaceList/0006-setupapi-Implement-SetupAddInstallSectionToDiskSpace.patch @@ -1,20 +1,20 @@ -From f0a9b4d7def2704e971966ac9eccca613e636c6f Mon Sep 17 00:00:00 2001 +From 37a1e2241efeb1d0654bbd6459b24ee6e92782d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 4 Mar 2016 04:54:37 +0100 -Subject: setupapi: Implement SetupAddInstallSectionToDiskSpaceList. +Subject: [PATCH] setupapi: Implement SetupAddInstallSectionToDiskSpaceList. --- - dlls/setupapi/diskspace.c | 87 +++++++++++++++++++- + dlls/setupapi/diskspace.c | 87 +++++++++++++++- dlls/setupapi/setupapi.spec | 2 +- - dlls/setupapi/tests/diskspace.c | 170 ++++++++++++++++++++++++++++++++++++++++ + dlls/setupapi/tests/diskspace.c | 170 ++++++++++++++++++++++++++++++++ include/setupapi.h | 3 + 4 files changed, 257 insertions(+), 5 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 2159ab9..626758b 100644 +index 3153a18856a..39673cd63b5 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c -@@ -295,15 +295,94 @@ BOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC diskspace, HINF hinf, HINF h +@@ -294,14 +294,93 @@ BOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC diskspace, HINF hinf, HINF h /*********************************************************************** * SetupAddInstallSectionToDiskSpaceListW (SETUPAPI.@) */ @@ -78,7 +78,7 @@ index 2159ab9..626758b 100644 return TRUE; } - /*********************************************************************** ++/*********************************************************************** + * SetupAddInstallSectionToDiskSpaceListA (SETUPAPI.@) + */ +BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC diskspace, @@ -109,12 +109,11 @@ index 2159ab9..626758b 100644 + return ret; +} + -+/*********************************************************************** + /*********************************************************************** * SetupQuerySpaceRequiredOnDriveW (SETUPAPI.@) */ - BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC diskspace, diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec -index 5554d16..adebf28 100644 +index ad8652ac93b..1d09b0e7e57 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -243,7 +243,7 @@ @@ -127,10 +126,10 @@ index 5554d16..adebf28 100644 @ stdcall SetupAddSectionToDiskSpaceListW(long long long wstr long ptr long) @ stdcall SetupAddToDiskSpaceListA(long str int64 long ptr long) diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index f40506c..c2c714e 100644 +index 7b8bcf4a342..13e025a8cfd 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c -@@ -947,6 +947,175 @@ static void test_SetupAddSectionToDiskSpaceListA(void) +@@ -935,6 +935,175 @@ static void test_SetupAddSectionToDiskSpaceListA(void) DeleteFileA(tmpfilename); } @@ -305,18 +304,18 @@ index f40506c..c2c714e 100644 + START_TEST(diskspace) { - is_win9x = !SetupCreateDiskSpaceListW((void *)0xdeadbeef, 0xdeadbeef, 0) && -@@ -960,4 +1129,5 @@ START_TEST(diskspace) + test_SetupCreateDiskSpaceListA(); +@@ -946,4 +1115,5 @@ START_TEST(diskspace) test_SetupAddToDiskSpaceListA(); test_SetupQueryDrivesInDiskSpaceListA(); test_SetupAddSectionToDiskSpaceListA(); + test_SetupAddInstallSectionToDiskSpaceListA(); } diff --git a/include/setupapi.h b/include/setupapi.h -index 0d6911d..229e37d 100644 +index 818cc12599a..e54c6c227f6 100644 --- a/include/setupapi.h +++ b/include/setupapi.h -@@ -1415,6 +1415,9 @@ DWORD WINAPI OpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID *); +@@ -1416,6 +1416,9 @@ DWORD WINAPI OpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID *); LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE *, PDWORD, PDWORD); /* RetreiveFileSecurity is not a typo, as per Microsoft's dlls */ DWORD WINAPI RetreiveFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR *); @@ -327,5 +326,5 @@ index 0d6911d..229e37d 100644 BOOL WINAPI SetupAddSectionToDiskSpaceListW(HDSKSPC, HINF, HINF, PCWSTR, UINT, PVOID, UINT); #define SetupAddSectionToDiskSpaceList WINELIB_NAME_AW(SetupAddSectionToDiskSpaceList) -- -2.7.1 +2.23.0