From 182d078581eb1270068ba5802150d28ac9cb72b4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 30 Sep 2006 18:36:12 +0000 Subject: [PATCH] Add vista check to sys_info --- src/os/win32/win32_sigar.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index d89513ef..b267e83a 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -2736,11 +2736,11 @@ int sigar_os_sys_info_get(sigar_t *sigar, version.dwOSVersionInfoSize = sizeof(version); GetVersionEx(&version); - if (sigar->winnt) { + if (version.dwMajorVersion == 4) { vendor_name = "Windows NT"; vendor_version = "NT"; } - else { + else if (version.dwMajorVersion == 5) { switch (version.dwMinorVersion) { case 0: vendor_name = "Windows 2000"; @@ -2761,6 +2761,14 @@ int sigar_os_sys_info_get(sigar_t *sigar, break; } } + else if (version.dwMajorVersion == 6) { + switch (version.dwMinorVersion) { + default: + vendor_name = "Windows Vista"; + vendor_version = "Vista"; + break; + } + } SIGAR_SSTRCPY(sysinfo->name, "Win32"); SIGAR_SSTRCPY(sysinfo->vendor, "Microsoft");