# HG changeset patch # User msolovie # Date 1481301647 -10800 # Node ID 3d710f44a7f2e63131d8b755fe0aa0b4ed9f39a9 # Parent 26562b0011471b4dd6b340a5f2c4e307b1f47e5c 8150490: Update OS detection code to recognize Windows Server 2016 Reviewed-by: mgronlun, alanb, dholmes diff -r 26562b001147 -r 3d710f44a7f2 src/os/windows/vm/os_windows.cpp --- a/src/os/windows/vm/os_windows.cpp Sun Feb 19 15:41:24 2017 +0300 +++ b/src/os/windows/vm/os_windows.cpp Fri Dec 09 19:40:47 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1642,6 +1642,22 @@ } if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) st->print(" , 64 bit"); + } else if (os_vers == 6003) { + if (osvi.wProductType == VER_NT_WORKSTATION) { + st->print(" Windows 8.1"); + } else { + st->print(" Windows Server 2012 R2"); + } + if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + st->print(" , 64 bit"); + } else if (os_vers == 10000) { + if (osvi.wProductType == VER_NT_WORKSTATION) { + st->print(" Windows 10"); + } else { + st->print(" Windows Server 2016"); + } + if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + st->print(" , 64 bit"); } else { // future os // Unrecognized windows, print out its major and minor versions st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);