diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-29 12:59:51 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-29 12:59:51 +0200 |
commit | 2ede40e67e41f294a32ba3e4797bc6fc4c070217 (patch) | |
tree | ebc7c92dfe7b4f007abd0b331b407ccc61b19578 /plugin/feedback/utils.cc | |
parent | ad2076945062f7f6d29752641048071229435391 (diff) | |
parent | a3f11f75499ffc867aefe24c80a9c57fbdfb8ac2 (diff) | |
download | mariadb-git-2ede40e67e41f294a32ba3e4797bc6fc4c070217.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'plugin/feedback/utils.cc')
-rw-r--r-- | plugin/feedback/utils.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc index b83b69be0ce..dad3d59e76d 100644 --- a/plugin/feedback/utils.cc +++ b/plugin/feedback/utils.cc @@ -43,7 +43,11 @@ static const char *get_os_version_name(OSVERSIONINFOEX *ver) { DWORD major = ver->dwMajorVersion; DWORD minor = ver->dwMinorVersion; - + if (major == 10 && minor == 0) + { + return (ver->wProductType == VER_NT_WORKSTATION) ? + "Windows 10" : "Windows Server 2016"; + } if (major == 6 && minor == 3) { return (ver->wProductType == VER_NT_WORKSTATION)? @@ -102,7 +106,12 @@ static int uname(struct utsname *buf) if(version_str && version_str[0]) sprintf(buf->version, "%s %s",version_str, ver.szCSDVersion); else - sprintf(buf->version, "%s", ver.szCSDVersion); + { + /* Fallback for unknown versions, e.g "Windows <major_ver>.<minor_ver>" */ + sprintf(buf->version, "Windows %d.%d%s", + ver.dwMajorVersion, ver.dwMinorVersion, + (ver.wProductType == VER_NT_WORKSTATION ? "" : " Server")); + } #ifdef _WIN64 strcpy(buf->machine, "x64"); |