mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to implement support for wbemprox Win32_SystemEnclosure table.
This commit is contained in:
parent
04afcf114c
commit
178d669519
@ -39,9 +39,10 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [6]:**
|
||||
**Bug fixes and features included in the next upcoming release [7]:**
|
||||
|
||||
* Add support for process specific debug channels
|
||||
* Add support for wbemprox Win32_SystemEnclosure table
|
||||
* Calculate msvcrt exponential math operations with higher precision ([Wine Bug #37149](https://bugs.winehq.org/show_bug.cgi?id=37149))
|
||||
* Fix regression caused by blacklisting supported OpenGL extensions ([Wine Bug #38264](https://bugs.winehq.org/show_bug.cgi?id=38264))
|
||||
* Properly handle closing sockets during a select call ([Wine Bug #38399](https://bugs.winehq.org/show_bug.cgi?id=38399))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -11,6 +11,7 @@ wine-staging (1.7.41) UNRELEASED; urgency=low
|
||||
* Added patch to properly handle closing sockets during a select call.
|
||||
* Added patch for support of process specific debug channels.
|
||||
* Added patch to recognize localhost as local machine in wbemprox.
|
||||
* Added patch to implement support for wbemprox Win32_SystemEnclosure table.
|
||||
* Added tests for RtlIpv6AddressToString and RtlIpv6AddressToStringEx.
|
||||
* Removed patches to fix invalid memory access in get_registry_locale_info (accepted upstream).
|
||||
* Removed patches to avoid repeated FIXMEs in PsLookupProcessByProcessId stub (accepted upstream).
|
||||
|
@ -214,6 +214,7 @@ patch_enable_all ()
|
||||
enable_version_VerQueryValue="$1"
|
||||
enable_version_VersionInfoEx="$1"
|
||||
enable_wbemprox_Localhost="$1"
|
||||
enable_wbemprox_Win32_SystemEnclosure="$1"
|
||||
enable_wiaservc_IEnumWIA_DEV_INFO="$1"
|
||||
enable_windowscodecs_TIFF_Decoder="$1"
|
||||
enable_wine_inf_Performance="$1"
|
||||
@ -712,6 +713,9 @@ patch_enable ()
|
||||
wbemprox-Localhost)
|
||||
enable_wbemprox_Localhost="$2"
|
||||
;;
|
||||
wbemprox-Win32_SystemEnclosure)
|
||||
enable_wbemprox_Win32_SystemEnclosure="$2"
|
||||
;;
|
||||
wiaservc-IEnumWIA_DEV_INFO)
|
||||
enable_wiaservc_IEnumWIA_DEV_INFO="$2"
|
||||
;;
|
||||
@ -4432,6 +4436,24 @@ if test "$enable_wbemprox_Localhost" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wbemprox-Win32_SystemEnclosure
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wbemprox/builtin.c, dlls/wbemprox/table.c, dlls/wbemprox/tests/query.c
|
||||
# |
|
||||
if test "$enable_wbemprox_Win32_SystemEnclosure" -eq 1; then
|
||||
patch_apply wbemprox-Win32_SystemEnclosure/0001-wbemprox-tests-Actually-test-the-return-value-of-IEn.patch
|
||||
patch_apply wbemprox-Win32_SystemEnclosure/0002-wbemprox-tests-Fix-memory-leak-when-tests-are-skippe.patch
|
||||
patch_apply wbemprox-Win32_SystemEnclosure/0003-wbemprox-Fix-handling-of-arrays-as-query-results.patch
|
||||
patch_apply wbemprox-Win32_SystemEnclosure/0004-wbemprox-Add-support-for-Win32_SystemEnclosure.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wbemprox/tests: Actually test the return value of IEnumWbemClassObject_Next.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wbemprox/tests: Fix memory leak when tests are skipped.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wbemprox: Fix handling of arrays as query results.", 1 },';
|
||||
echo '+ { "Michael Müller", "wbemprox: Add support for Win32_SystemEnclosure.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wiaservc-IEnumWIA_DEV_INFO
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,26 @@
|
||||
From edbc92c9930ae5778ddee9426218f1b4c7ee10bb Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 06:49:55 +0200
|
||||
Subject: wbemprox/tests: Actually test the return value of
|
||||
IEnumWbemClassObject_Next.
|
||||
|
||||
---
|
||||
dlls/wbemprox/tests/query.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
|
||||
index 7e031d2..88e8fb4 100644
|
||||
--- a/dlls/wbemprox/tests/query.c
|
||||
+++ b/dlls/wbemprox/tests/query.c
|
||||
@@ -382,7 +382,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
|
||||
return;
|
||||
}
|
||||
|
||||
- IEnumWbemClassObject_Next( result, 10000, 1, &service, &count );
|
||||
+ hr = IEnumWbemClassObject_Next( result, 10000, 1, &service, &count );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
|
||||
type = 0xdeadbeef;
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 2534d6561452c812cf539c2ca81c464bee83521d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 07:58:06 +0200
|
||||
Subject: wbemprox/tests: Fix memory leak when tests are skipped.
|
||||
|
||||
---
|
||||
dlls/wbemprox/tests/query.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
|
||||
index 88e8fb4..02774db 100644
|
||||
--- a/dlls/wbemprox/tests/query.c
|
||||
+++ b/dlls/wbemprox/tests/query.c
|
||||
@@ -158,7 +158,7 @@ static void test_Win32_Service( IWbemServices *services )
|
||||
if (hr != S_OK)
|
||||
{
|
||||
win_skip( "Win32_Service not available\n" );
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &state );
|
||||
@@ -232,6 +232,7 @@ static void test_Win32_Service( IWbemServices *services )
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
if (service) IWbemClassObject_Release( service );
|
||||
|
||||
+out:
|
||||
SysFreeString( empty );
|
||||
SysFreeString( class );
|
||||
}
|
||||
@@ -372,14 +373,14 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
|
||||
if (!compname[0] || !username[0])
|
||||
{
|
||||
skip( "Failed to get user or computer name\n" );
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
|
||||
if (hr != S_OK)
|
||||
{
|
||||
win_skip( "Win32_ComputerSystem not available\n" );
|
||||
- return;
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &service, &count );
|
||||
@@ -405,6 +406,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
|
||||
|
||||
IWbemClassObject_Release( service );
|
||||
IEnumWbemClassObject_Release( result );
|
||||
+out:
|
||||
SysFreeString( query );
|
||||
SysFreeString( wql );
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,75 @@
|
||||
From 97f87fdced630139111ed66af70a0ce01b7a28d8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 09:38:15 +0200
|
||||
Subject: wbemprox: Fix handling of arrays as query results.
|
||||
|
||||
---
|
||||
dlls/wbemprox/builtin.c | 22 ++++++++++++++++------
|
||||
dlls/wbemprox/table.c | 7 ++++++-
|
||||
2 files changed, 22 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
|
||||
index 8ba2642..f1f51c5 100644
|
||||
--- a/dlls/wbemprox/builtin.c
|
||||
+++ b/dlls/wbemprox/builtin.c
|
||||
@@ -938,7 +938,7 @@ struct record_service
|
||||
struct record_sid
|
||||
{
|
||||
const WCHAR *accountname;
|
||||
- const UINT8 *binaryrepresentation;
|
||||
+ const struct array *binaryrepresentation;
|
||||
const WCHAR *referenceddomainname;
|
||||
const WCHAR *sid;
|
||||
UINT32 sidlength;
|
||||
@@ -2614,12 +2614,22 @@ static WCHAR *get_accountname( LSA_TRANSLATED_NAME *name )
|
||||
if (!name || !name->Name.Buffer) return NULL;
|
||||
return heap_strdupW( name->Name.Buffer );
|
||||
}
|
||||
-static UINT8 *get_binaryrepresentation( PSID sid, UINT len )
|
||||
+static struct array *get_binaryrepresentation( PSID sid, UINT len )
|
||||
{
|
||||
- UINT8 *ret = heap_alloc( len );
|
||||
- if (!ret) return NULL;
|
||||
- memcpy( ret, sid, len );
|
||||
- return ret;
|
||||
+ struct array *array = heap_alloc( sizeof(struct array) );
|
||||
+ if (array)
|
||||
+ {
|
||||
+ UINT8 *ret = heap_alloc( len );
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ memcpy( ret, sid, len );
|
||||
+ array->count = len;
|
||||
+ array->ptr = ret;
|
||||
+ return array;
|
||||
+ }
|
||||
+ heap_free( array );
|
||||
+ }
|
||||
+ return NULL;
|
||||
}
|
||||
static WCHAR *get_referenceddomainname( LSA_REFERENCED_DOMAIN_LIST *domain )
|
||||
{
|
||||
diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
|
||||
index 0c57f26..273b8cb 100644
|
||||
--- a/dlls/wbemprox/table.c
|
||||
+++ b/dlls/wbemprox/table.c
|
||||
@@ -288,10 +288,15 @@ void free_row_values( const struct table *table, UINT row )
|
||||
if (!(table->columns[i].type & COL_FLAG_DYNAMIC)) continue;
|
||||
|
||||
type = table->columns[i].type & COL_TYPE_MASK;
|
||||
- if (type == CIM_STRING || type == CIM_DATETIME || (type & CIM_FLAG_ARRAY))
|
||||
+ if (type == CIM_STRING || type == CIM_DATETIME)
|
||||
{
|
||||
if (get_value( table, row, i, &val ) == S_OK) heap_free( (void *)(INT_PTR)val );
|
||||
}
|
||||
+ else if (type & CIM_FLAG_ARRAY)
|
||||
+ {
|
||||
+ if (get_value( table, row, i, &val ) == S_OK)
|
||||
+ destroy_array( (void *)(INT_PTR)val, type & CIM_TYPE_MASK );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
@ -0,0 +1,129 @@
|
||||
From 7a6e4a5a97cf2dc1c2ffbbee5a4acbea9c762977 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 16 Apr 2015 21:46:13 +0200
|
||||
Subject: wbemprox: Add support for Win32_SystemEnclosure.
|
||||
|
||||
---
|
||||
dlls/wbemprox/builtin.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 57 insertions(+)
|
||||
|
||||
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
|
||||
index f1f51c5..21d0030 100644
|
||||
--- a/dlls/wbemprox/builtin.c
|
||||
+++ b/dlls/wbemprox/builtin.c
|
||||
@@ -98,6 +98,8 @@ static const WCHAR class_sidW[] =
|
||||
{'W','i','n','3','2','_','S','I','D',0};
|
||||
static const WCHAR class_sounddeviceW[] =
|
||||
{'W','i','n','3','2','_','S','o','u','n','d','D','e','v','i','c','e',0};
|
||||
+static const WCHAR class_systemenclosureW[] =
|
||||
+ {'W','i','n','3','2','_','S','y','s','t','e','m','E','n','c','l','o','s','u','r','e',0};
|
||||
static const WCHAR class_videocontrollerW[] =
|
||||
{'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0};
|
||||
|
||||
@@ -133,6 +135,8 @@ static const WCHAR prop_capacityW[] =
|
||||
{'C','a','p','a','c','i','t','y',0};
|
||||
static const WCHAR prop_captionW[] =
|
||||
{'C','a','p','t','i','o','n',0};
|
||||
+static const WCHAR prop_chassistypesW[] =
|
||||
+ {'C','h','a','s','s','i','s','T','y','p','e','s',0};
|
||||
static const WCHAR prop_classW[] =
|
||||
{'C','l','a','s','s',0};
|
||||
static const WCHAR prop_codesetW[] =
|
||||
@@ -225,6 +229,8 @@ static const WCHAR prop_localdatetimeW[] =
|
||||
{'L','o','c','a','l','D','a','t','e','T','i','m','e',0};
|
||||
static const WCHAR prop_localeW[] =
|
||||
{'L','o','c','a','l','e',0};
|
||||
+static const WCHAR prop_lockpresentW[] =
|
||||
+ {'L','o','c','k','P','r','e','s','e','n','t',0};
|
||||
static const WCHAR prop_macaddressW[] =
|
||||
{'M','A','C','A','d','d','r','e','s','s',0};
|
||||
static const WCHAR prop_manufacturerW[] =
|
||||
@@ -590,6 +596,16 @@ static const struct column col_stdregprov[] =
|
||||
{ method_enumvaluesW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
|
||||
{ method_getstringvalueW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }
|
||||
};
|
||||
+static const struct column col_systemenclosure[] =
|
||||
+{
|
||||
+ { prop_captionW, CIM_STRING },
|
||||
+ { prop_chassistypesW, CIM_UINT16|CIM_FLAG_ARRAY },
|
||||
+ { prop_descriptionW, CIM_STRING },
|
||||
+ { prop_lockpresentW, CIM_BOOLEAN },
|
||||
+ { prop_manufacturerW, CIM_STRING },
|
||||
+ { prop_nameW, CIM_STRING },
|
||||
+ { prop_tagW, CIM_STRING },
|
||||
+};
|
||||
static const struct column col_systemsecurity[] =
|
||||
{
|
||||
{ method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
|
||||
@@ -702,6 +718,12 @@ static const WCHAR physicalmedia_tagW[] =
|
||||
{'\\','\\','.','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0};
|
||||
static const WCHAR sounddevice_productnameW[] =
|
||||
{'W','i','n','e',' ','A','u','d','i','o',' ','D','e','v','i','c','e',0};
|
||||
+static const WCHAR systemenclosure_systemenclosureW[] =
|
||||
+ {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',0};
|
||||
+static const WCHAR systemenclosure_tagW[] =
|
||||
+ {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',' ','0',0};
|
||||
+static const WCHAR systemenclosure_ManufacturerW[] =
|
||||
+ {'W','i','n','e',0};
|
||||
static const WCHAR videocontroller_dactypeW[] =
|
||||
{'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0};
|
||||
static const WCHAR videocontroller_deviceidW[] =
|
||||
@@ -960,6 +982,16 @@ struct record_systemsecurity
|
||||
class_method *getsd;
|
||||
class_method *setsd;
|
||||
};
|
||||
+struct record_systemenclosure
|
||||
+{
|
||||
+ const WCHAR *caption;
|
||||
+ const struct array *chassistypes;
|
||||
+ const WCHAR *description;
|
||||
+ int lockpresent;
|
||||
+ const WCHAR *manufacturer;
|
||||
+ const WCHAR *name;
|
||||
+ const WCHAR *tag;
|
||||
+};
|
||||
struct record_videocontroller
|
||||
{
|
||||
const WCHAR *adapter_dactype;
|
||||
@@ -1044,6 +1076,30 @@ static const struct record_stdregprov data_stdregprov[] =
|
||||
{
|
||||
{ reg_enum_key, reg_enum_values, reg_get_stringvalue }
|
||||
};
|
||||
+
|
||||
+static const UINT16 chassistypes[] =
|
||||
+{
|
||||
+ 1,
|
||||
+};
|
||||
+
|
||||
+static const struct array chassistypes_array =
|
||||
+{
|
||||
+ sizeof(chassistypes)/sizeof(chassistypes[0]),
|
||||
+ &chassistypes
|
||||
+};
|
||||
+
|
||||
+static const struct record_systemenclosure data_systemenclosure[] =
|
||||
+{
|
||||
+ {
|
||||
+ systemenclosure_systemenclosureW,
|
||||
+ &chassistypes_array,
|
||||
+ systemenclosure_systemenclosureW,
|
||||
+ FALSE,
|
||||
+ systemenclosure_ManufacturerW,
|
||||
+ systemenclosure_systemenclosureW,
|
||||
+ systemenclosure_tagW,
|
||||
+ }
|
||||
+};
|
||||
static const struct record_systemsecurity data_systemsecurity[] =
|
||||
{
|
||||
{ security_get_sd, security_set_sd }
|
||||
@@ -2817,6 +2873,7 @@ static struct table builtin_classes[] =
|
||||
{ class_sounddeviceW, SIZEOF(col_sounddevice), col_sounddevice, SIZEOF(data_sounddevice), 0, (BYTE *)data_sounddevice },
|
||||
{ class_stdregprovW, SIZEOF(col_stdregprov), col_stdregprov, SIZEOF(data_stdregprov), 0, (BYTE *)data_stdregprov },
|
||||
{ class_systemsecurityW, SIZEOF(col_systemsecurity), col_systemsecurity, SIZEOF(data_systemsecurity), 0, (BYTE *)data_systemsecurity },
|
||||
+ { class_systemenclosureW, SIZEOF(col_systemenclosure), col_systemenclosure, SIZEOF(data_systemenclosure), 0, (BYTE *)data_systemenclosure },
|
||||
{ class_videocontrollerW, SIZEOF(col_videocontroller), col_videocontroller, 0, 0, NULL, fill_videocontroller }
|
||||
};
|
||||
|
||||
--
|
||||
2.3.5
|
||||
|
1
patches/wbemprox-Win32_SystemEnclosure/definition
Normal file
1
patches/wbemprox-Win32_SystemEnclosure/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: Add support for wbemprox Win32_SystemEnclosure table
|
Loading…
x
Reference in New Issue
Block a user