Module: wine Branch: master Commit: 4022fb9ba3eacd6b09d35b457754a7e17c67564e URL: https://gitlab.winehq.org/wine/wine/-/commit/4022fb9ba3eacd6b09d35b457754a7e...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Feb 7 15:46:11 2024 +0100
server: Don't report alternate 64-bit machines as supported.
---
dlls/ntdll/unix/system.c | 26 +++++++++++++------------- server/registry.c | 12 ++---------- 2 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index d2df1dd50c2..cb99b7c2cc3 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -3385,24 +3385,24 @@ NTSTATUS WINAPI NtQuerySystemInformationEx( SYSTEM_INFORMATION_CLASS class, ret = STATUS_BUFFER_TOO_SMALL; break; } - for (i = 0; i < supported_machines_count; i++) + memset( machines, 0, len ); + + /* native machine */ + machines[0].Machine = supported_machines[0]; + machines[0].UserMode = 1; + machines[0].KernelMode = 1; + machines[0].Native = 1; + machines[0].Process = (supported_machines[0] == machine || is_machine_64bit( machine )); + machines[0].WoW64Container = 0; + machines[0].ReservedZero0 = 0; + /* wow64 machines */ + for (i = 1; i < supported_machines_count; i++) { machines[i].Machine = supported_machines[i]; machines[i].UserMode = 1; - machines[i].KernelMode = machines[i].Native = i == 0; machines[i].Process = supported_machines[i] == machine; - machines[i].WoW64Container = 0; - machines[i].ReservedZero0 = 0; + machines[i].WoW64Container = 1; } - - machines[i].Machine = 0; - machines[i].KernelMode = 0; - machines[i].UserMode = 0; - machines[i].Native = 0; - machines[i].Process = 0; - machines[i].WoW64Container = 0; - machines[i].ReservedZero0 = 0; - ret = STATUS_SUCCESS; break; } diff --git a/server/registry.c b/server/registry.c index da6a6d0982e..e88bed1e72e 100644 --- a/server/registry.c +++ b/server/registry.c @@ -1857,10 +1857,9 @@ static void init_supported_machines(void) if (prefix_type == PREFIX_64BIT) { supported_machines[count++] = IMAGE_FILE_MACHINE_ARM64; - supported_machines[count++] = IMAGE_FILE_MACHINE_AMD64; supported_machines[count++] = IMAGE_FILE_MACHINE_I386; + /* supported_machines[count++] = IMAGE_FILE_MACHINE_ARMNT; not supported yet */ } - supported_machines[count++] = IMAGE_FILE_MACHINE_ARMNT; #else #error Unsupported machine #endif @@ -1877,15 +1876,9 @@ void init_registry(void) static const WCHAR classes_i386[] = {'S','o','f','t','w','a','r','e','\', 'C','l','a','s','s','e','s','\', 'W','o','w','6','4','3','2','N','o','d','e'}; - static const WCHAR classes_amd64[] = {'S','o','f','t','w','a','r','e','\', - 'C','l','a','s','s','e','s','\', - 'W','o','w','6','4','6','4','N','o','d','e'}; static const WCHAR classes_arm[] = {'S','o','f','t','w','a','r','e','\', 'C','l','a','s','s','e','s','\', 'W','o','w','A','A','3','2','N','o','d','e'}; - static const WCHAR classes_arm64[] = {'S','o','f','t','w','a','r','e','\', - 'C','l','a','s','s','e','s','\', - 'W','o','w','A','A','6','4','N','o','d','e'}; static const WCHAR perflib[] = {'S','o','f','t','w','a','r','e','\', 'M','i','c','r','o','s','o','f','t','\', 'W','i','n','d','o','w','s',' ','N','T','\', @@ -1956,8 +1949,7 @@ void init_registry(void) { case IMAGE_FILE_MACHINE_I386: name.str = classes_i386; name.len = sizeof(classes_i386); break; case IMAGE_FILE_MACHINE_ARMNT: name.str = classes_arm; name.len = sizeof(classes_arm); break; - case IMAGE_FILE_MACHINE_AMD64: name.str = classes_amd64; name.len = sizeof(classes_amd64); break; - case IMAGE_FILE_MACHINE_ARM64: name.str = classes_arm64; name.len = sizeof(classes_arm64); break; + default: continue; } if ((key = create_key_recursive( hklm, &name, current_time ))) {