[PATCH 1/3] wbemprox: Implement Win32_PhysicalMemory.FormFactor.

Hans Leidekker hans at codeweavers.com
Tue Feb 25 04:39:51 CST 2020


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/wbemprox/builtin.c     | 5 +++++
 dlls/wbemprox/tests/query.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index bfe913a32a..f422e9c61d 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -264,6 +264,8 @@ static const WCHAR prop_filesystemW[] =
     {'F','i','l','e','S','y','s','t','e','m',0};
 static const WCHAR prop_flavorW[] =
     {'F','l','a','v','o','r',0};
+static const WCHAR prop_formfactorW[] =
+    {'F','o','r','m','F','a','c','t','o','r',0};
 static const WCHAR prop_freespaceW[] =
     {'F','r','e','e','S','p','a','c','e',0};
 static const WCHAR prop_freephysicalmemoryW[] =
@@ -703,6 +705,7 @@ static const struct column col_physicalmemory[] =
     { prop_capacityW,             CIM_UINT64 },
     { prop_configuredclockspeedW, CIM_UINT32 },
     { prop_devicelocatorW,        CIM_STRING },
+    { prop_formfactorW,           CIM_UINT16 },
     { prop_memorytypeW,           CIM_UINT16 },
     { prop_partnumberW,           CIM_STRING }
 };
@@ -1186,6 +1189,7 @@ struct record_physicalmemory
     UINT64       capacity;
     UINT32       configuredclockspeed;
     const WCHAR *devicelocator;
+    UINT16       formfactor;
     UINT16       memorytype;
     const WCHAR *partnumber;
 };
@@ -3438,6 +3442,7 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e
     rec->capacity             = get_total_physical_memory();
     rec->configuredclockspeed = 0;
     rec->devicelocator        = dimm0W;
+    rec->formfactor           = 8; /* DIMM */
     rec->memorytype           = 9; /* RAM */
     rec->partnumber           = NULL;
     if (!match_row( table, row, cond, &status )) free_row_values( table, row );
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 40eaefee4c..97f8dca561 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -1338,6 +1338,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
 {
     static const WCHAR capacityW[] = {'C','a','p','a','c','i','t','y',0};
     static const WCHAR memorytypeW[] = {'M','e','m','o','r','y','T','y','p','e',0};
+    static const WCHAR formfactorW[] = {'F','o','r','m','F','a','c','t','o','r',0};
     static const WCHAR devicelocatorW[] = {'D','e','v','i','c','e','L','o','c','a','t','o','r',0};
     static const WCHAR queryW[] =
         {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
@@ -1362,6 +1363,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
     {
         check_property( obj, capacityW, VT_BSTR, CIM_UINT64 );
         check_property( obj, devicelocatorW, VT_BSTR, CIM_STRING );
+        check_property( obj, formfactorW, VT_I4, CIM_UINT16 );
         check_property( obj, memorytypeW, VT_I4, CIM_UINT16 );
         IWbemClassObject_Release( obj );
     }
-- 
2.20.1




More information about the wine-devel mailing list