libimcv: Be a little more verbose about the Windows system reported

This commit is contained in:
Martin Willi
2014-06-04 15:53:10 +02:00
parent ede10dd974
commit 9b7d1a3b33
+10 -8
View File
@@ -133,14 +133,16 @@ static bool extract_platform_info(os_type_t *type, chunk_t *name,
return FALSE; return FALSE;
} }
*type = OS_TYPE_WINDOWS; *type = OS_TYPE_WINDOWS;
if (osvie.wProductType == VER_NT_WORKSTATION) snprintf(buf, sizeof(buf), "Windows %s %s",
{ osvie.wProductType == VER_NT_WORKSTATION ? "Client" : "Server",
*name = chunk_clone(chunk_from_str("Client")); #ifdef WIN64
} "x86_64"
else #else
{ "x86"
*name = chunk_clone(chunk_from_str("Server")); #endif
} );
*name = chunk_clone(chunk_from_str(buf));
snprintf(buf, sizeof(buf), "%d.%d.%d (SP %d.%d)", snprintf(buf, sizeof(buf), "%d.%d.%d (SP %d.%d)",
osvie.dwMajorVersion, osvie.dwMinorVersion, osvie.dwBuildNumber, osvie.dwMajorVersion, osvie.dwMinorVersion, osvie.dwBuildNumber,
osvie.wServicePackMajor, osvie.wServicePackMinor); osvie.wServicePackMajor, osvie.wServicePackMinor);