ALT Linux repos
S: | 8.15.1-alt1 |
5.0: | 1.0.9-alt37 |
4.1: | 1.0.9-alt0.M41.35 |
4.0: | 1.0.9-alt0.M40.35 |
+backports: | 1.0.9-alt0.M40.16 |
3.0: | 20050715-alt0.1 |
+backports: | 20061212-alt0.M30.1 |
Group :: Emulators
RPM: wine
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 0002-add-fast-hack-for-RegQueryValueEx-HKEY_PERFORMANCE_D.patch
Download
Download
From 85358f11fd312fb530e39930e8ec278fa3b34449 Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Fri, 7 Apr 2017 11:16:45 +0300
Subject: [PATCH 2/2] add fast hack for RegQueryValueEx HKEY_PERFORMANCE_DATA
(eterbug #11712)
To: wine-patches <wine-patches@winehq.org>
---
dlls/advapi32/registry.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index e32f48a..000ae96 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -37,6 +37,7 @@
#include "winerror.h"
#include "winternl.h"
#include "winuser.h"
+#include "winperf.h"
#include "sddl.h"
#include "advapi32_misc.h"
@@ -1502,6 +1503,41 @@ LSTATUS WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDW
(count && data) ? *count : 0 );
if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
+
+ /* Etersoft hack (eterbug #11712) */
+ if (hkey == HKEY_PERFORMANCE_DATA) {
+ status = STATUS_SUCCESS;
+ if (*count < sizeof(PERF_DATA_BLOCK)) {
+ FIXME("HKEY_PERF ERROR_MORE_DATA: %d but needed %d\n", *count, sizeof(PERF_DATA_BLOCK));
+ *count = sizeof(PERF_DATA_BLOCK);
+ return ERROR_MORE_DATA;
+ }
+ {
+ PERF_DATA_BLOCK *pdb = (PERF_DATA_BLOCK *)data;
+ LARGE_INTEGER li;
+ li.QuadPart = 0L;
+ pdb->Signature[0] = 'P';
+ pdb->Signature[1] = 'E';
+ pdb->Signature[2] = 'R';
+ pdb->Signature[3] = 'F';
+ pdb->LittleEndian = 1; /* little endian */
+ pdb->Version = 1;
+ pdb->Revision = 1;
+ pdb->TotalByteLength = sizeof(*pdb);
+ pdb->HeaderLength = sizeof(*pdb);
+ pdb->NumObjectTypes = 0;
+ pdb->PerfTime = li;
+ pdb->PerfFreq = li; // can be 0
+ pdb->PerfTime100nSec = li;
+ pdb->SystemNameLength = 0;
+ pdb->SystemNameOffset = 0;
+ *count = sizeof(PERF_DATA_BLOCK);
+ FIXME("PERF_DATA_BLOCK %d\n", *count);
+ }
+ return RtlNtStatusToDosError(status);
+ }
+ /* END of Etersoft hack */
+
if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
RtlInitUnicodeString( &name_str, name );
@@ -1592,6 +1628,41 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO
hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
+
+ /* Etersoft hack (eterbug #11712) */
+ if (hkey == HKEY_PERFORMANCE_DATA) {
+ status = STATUS_SUCCESS;
+ if (*count < sizeof(PERF_DATA_BLOCK)) {
+ FIXME("HKEY_PERF ERROR_MORE_DATA: %d but needed %d\n", *count, sizeof(PERF_DATA_BLOCK));
+ *count = sizeof(PERF_DATA_BLOCK);
+ return ERROR_MORE_DATA;
+ }
+ {
+ PERF_DATA_BLOCK *pdb = (PERF_DATA_BLOCK *)data;
+ LARGE_INTEGER li;
+ li.QuadPart = 0L;
+ pdb->Signature[0] = 'P';
+ pdb->Signature[1] = 'E';
+ pdb->Signature[2] = 'R';
+ pdb->Signature[3] = 'F';
+ pdb->LittleEndian = 1; /* little endian */
+ pdb->Version = 1;
+ pdb->Revision = 1;
+ pdb->TotalByteLength = sizeof(*pdb);
+ pdb->HeaderLength = sizeof(*pdb);
+ pdb->NumObjectTypes = 0;
+ pdb->PerfTime = li;
+ pdb->PerfFreq = li; // can be 0
+ pdb->PerfTime100nSec = li;
+ pdb->SystemNameLength = 0;
+ pdb->SystemNameOffset = 0;
+ *count = sizeof(PERF_DATA_BLOCK);
+ FIXME("PERF_DATA_BLOCK %d\n", *count);
+ }
+ return RtlNtStatusToDosError(status);
+ }
+ /* END of Etersoft hack */
+
if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
if (count) datalen = *count;
--
2.10.2