changeset 4148:3d710f44a7f2

8150490: Update OS detection code to recognize Windows Server 2016 Reviewed-by: mgronlun, alanb, dholmes
author msolovie
date Fri, 09 Dec 2016 19:40:47 +0300
parents 26562b001147
children 285e3f9a1d18
files src/os/windows/vm/os_windows.cpp
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);