* cygcheck.cc (dump_sysinfo): Convert "if/else if" chain to a switch
statement. Drop "not yet supported" and "Server" from Windows 2012 output string.
This commit is contained in:
parent
509212aa98
commit
f085c12fd7
@ -1,3 +1,9 @@
|
|||||||
|
2012-10-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cygcheck.cc (dump_sysinfo): Convert "if/else if" chain to a switch
|
||||||
|
statement. Drop "not yet supported" and "Server" from Windows 2012
|
||||||
|
output string.
|
||||||
|
|
||||||
2012-09-02 Corinna Vinschen <corinna@vinschen.de>
|
2012-09-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* cygcheck.cc (dump_sysinfo): Drop "not yet supported" text from
|
* cygcheck.cc (dump_sysinfo): Drop "not yet supported" text from
|
||||||
|
@ -1433,15 +1433,21 @@ dump_sysinfo ()
|
|||||||
BOOL (WINAPI *GetProductInfo) (DWORD, DWORD, DWORD, DWORD, PDWORD) =
|
BOOL (WINAPI *GetProductInfo) (DWORD, DWORD, DWORD, DWORD, PDWORD) =
|
||||||
(BOOL (WINAPI *)(DWORD, DWORD, DWORD, DWORD, PDWORD))
|
(BOOL (WINAPI *)(DWORD, DWORD, DWORD, DWORD, PDWORD))
|
||||||
GetProcAddress (k32, "GetProductInfo");
|
GetProcAddress (k32, "GetProductInfo");
|
||||||
if (osversion.dwMinorVersion == 0)
|
switch (osversion.dwMinorVersion)
|
||||||
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
{
|
||||||
? "Vista" : "2008");
|
case 0:
|
||||||
else if (osversion.dwMinorVersion == 1)
|
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
||||||
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
? "Vista" : "2008");
|
||||||
? "7" : "2008 R2");
|
break;
|
||||||
else if (osversion.dwMinorVersion == 2)
|
case 1:
|
||||||
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
||||||
? "8" : "Server 2012 (not yet supported!)");
|
? "7" : "2008 R2");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
|
||||||
|
? "8" : "2012");
|
||||||
|
break;
|
||||||
|
}
|
||||||
DWORD prod;
|
DWORD prod;
|
||||||
if (GetProductInfo (osversion.dwMajorVersion,
|
if (GetProductInfo (osversion.dwMajorVersion,
|
||||||
osversion.dwMinorVersion,
|
osversion.dwMinorVersion,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user