Module: wine Branch: master Commit: 38e976acdd0ae9fdfdd08497e3b076c5adfbc75e URL: http://source.winehq.org/git/wine.git/?a=commit;h=38e976acdd0ae9fdfdd08497e3...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Jun 14 10:02:29 2013 +0200
wbemprox: Implement Win32_Processor.AddressWidth.
---
dlls/wbemprox/builtin.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 35c18e3..1e9c297 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -92,6 +92,8 @@ static const WCHAR prop_adapterramW[] = {'A','d','a','p','t','e','r','R','A','M',0}; static const WCHAR prop_adaptertypeW[] = {'A','d','a','p','t','e','r','T','y','p','e',0}; +static const WCHAR prop_addresswidthW[] = + {'A','d','d','r','e','s','s','W','i','d','t','h',0}; static const WCHAR prop_bootableW[] = {'B','o','o','t','a','b','l','e',0}; static const WCHAR prop_bootpartitionW[] = @@ -354,6 +356,7 @@ static const struct column col_process[] = }; static const struct column col_processor[] = { + { prop_addresswidthW, CIM_UINT16, VT_I4 }, { prop_cpustatusW, CIM_UINT16 }, { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, { prop_familyW, CIM_UINT16, VT_I4 }, @@ -595,6 +598,7 @@ struct record_process }; struct record_processor { + UINT16 addresswidth; UINT16 cpu_status; const WCHAR *device_id; UINT16 family; @@ -1655,6 +1659,13 @@ static UINT get_processor_maxclockspeed( void ) } return ret; } +static const WCHAR *get_osarchitecture(void) +{ + SYSTEM_INFO info; + GetNativeSystemInfo( &info ); + if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return os_64bitW; + return os_32bitW; +}
static enum fill_status fill_processor( struct table *table, const struct expr *cond ) { @@ -1676,6 +1687,7 @@ static enum fill_status fill_processor( struct table *table, const struct expr * for (i = 0; i < count; i++) { rec = (struct record_processor *)(table->data + offset); + rec->addresswidth = get_osarchitecture() == os_32bitW ? 32 : 64; rec->cpu_status = 1; /* CPU Enabled */ sprintfW( device_id, fmtW, i ); rec->device_id = heap_strdupW( device_id ); @@ -1715,13 +1727,6 @@ static WCHAR *get_lastbootuptime(void) sprintfW( ret, fmtW, tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second, tf.Milliseconds * 1000 ); return ret; } -static const WCHAR *get_osarchitecture(void) -{ - SYSTEM_INFO info; - GetNativeSystemInfo( &info ); - if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return os_64bitW; - return os_32bitW; -} static WCHAR *get_systemdirectory(void) { void *redir;