From: Oliver Kurth Date: Mon, 3 Jun 2019 20:39:44 +0000 (-0700) Subject: Fix asianux identification. X-Git-Tag: stable-11.0.0~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1749604dc3481d0cc670e97945b915821c1039d3;p=thirdparty%2Fopen-vm-tools.git Fix asianux identification. 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. --- diff --git a/open-vm-tools/AUTHORS b/open-vm-tools/AUTHORS index b5a26ddf4..08cc28ef2 100644 --- a/open-vm-tools/AUTHORS +++ b/open-vm-tools/AUTHORS @@ -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 diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 67f94eaff..348a67ecb 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -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);