summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2016-09-28 12:52:01 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2016-09-28 12:52:01 +0000
commit0e76054b7b5f09246f31f8927194e9782f82634b (patch)
treed1e2648da1988c1c23ed1babcc1eb8ff09d5e4a1 /plugin
parentb38d3c3d8afea7183f2a595f0c8d8dd7efaa801f (diff)
downloadmariadb-git-0e76054b7b5f09246f31f8927194e9782f82634b.tar.gz
Feedback plugin : add support for Windows 10 / Server 2016.
Also add fallback version string for unknown future versions.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/feedback/utils.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc
index f6fcb3d2082..cff19c93ed2 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");