]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix asianux identification.
authorOliver Kurth <okurth@vmware.com>
Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)
Add asianux to distroArray and change how asianux releases 7 and 8
are identified.

This came in as a pull request on github for open-vm-tools:
https://github.com/vmware/open-vm-tools/pull/325 .  Apparently
the OS identification in /etc/asianux-release changed with Asianux
7, and as a result tools does not identify it correctly.

open-vm-tools/AUTHORS
open-vm-tools/lib/misc/hostinfoPosix.c

index b5a26ddf4d978b734f6de486bba23f3b640b1720..08cc28ef258ae36ef64b99e93e53766f0a6a2b12 100644 (file)
@@ -46,3 +46,6 @@ Josh Paetzel    Additional changes to vmmemctl.ko for FreeBSD 12.0 API changes.
 [Code]Ai        Highlighted a potential NULL pointer dereference and four
                 pieces of dead code.
                 - https://github.com/vmware/open-vm-tools/pull/247
+
+Haruki Tsurumoto        Fix Asianux identification
+                - https://github.com/vmware/open-vm-tools/pull/325
index 67f94eaff7745559ad880beb6f739286c27b92e4..348a67ecb95473eb441b16e1764c93b6977380ab 100644 (file)
@@ -185,6 +185,7 @@ static const DistroInfo distroArray[] = {
    { "Annvix",             "/etc/annvix-release"        },
    { "Arch",               "/etc/arch-release"          },
    { "Arklinux",           "/etc/arklinux-release"      },
+   { "Asianux",            "/etc/asianux-release"       },
    { "Aurox",              "/etc/aurox-release"         },
    { "BlackCat",           "/etc/blackcat-release"      },
    { "Cobalt",             "/etc/cobalt-release"        },
@@ -890,11 +891,11 @@ HostinfoGetOSShortName(const char *distro,      // IN: full distro name
    } else if (strstr(distroLower, "asianux server 5") ||
               strstr(distroLower, "asianux client 5")) {
       Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize);
-   } else if (strstr(distroLower, "asianux server 7") ||
-              strstr(distroLower, "asianux client 7")) {
+   } else if (strstr(distroLower, "asianux server release 7") ||
+              strstr(distroLower, "asianux client release 7")) {
       Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize);
-   } else if (strstr(distroLower, "asianux server 8") ||
-              strstr(distroLower, "asianux client 8")) {
+   } else if (strstr(distroLower, "asianux server release 8") ||
+              strstr(distroLower, "asianux client release 8")) {
       Str_Strcpy(distroShort, STR_OS_ASIANUX_8, distroShortSize);
    } else if (strstr(distroLower, "aurox")) {
       Str_Strcpy(distroShort, STR_OS_AUROX, distroShortSize);