From: Oliver Kurth Date: Fri, 9 Nov 2018 21:22:25 +0000 (-0800) Subject: Provide a distroName, when available, when the lsb_release cmd fails. X-Git-Tag: stable-11.0.0~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12cfe6d2f3b060d108f641347514b6df63efc99b;p=thirdparty%2Fopen-vm-tools.git Provide a distroName, when available, when the lsb_release cmd fails. The default, in Linux, is "Linux". If a distoName was present in the lsb release description file, it should be used. --- diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 1946a5a7e..dd795b8eb 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -1380,6 +1380,11 @@ HostinfoLsb(char *distro, // OUT: if (args == NULL) { Log("%s: Error: no distro file found\n", __FUNCTION__); } else { + if (args[0] != NULL) { // Name + Str_Strcpy(detailedDataFields[DISTRO_NAME].value, args[0], + sizeof detailedDataFields[DISTRO_NAME].value); + } + if (args[1] != NULL) { // Release Str_Strcpy(detailedDataFields[DISTRO_VERSION].value, args[1], sizeof detailedDataFields[DISTRO_VERSION].value);