]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Provide a distroName, when available, when the lsb_release cmd fails.
authorOliver Kurth <okurth@vmware.com>
Fri, 9 Nov 2018 21:22:25 +0000 (13:22 -0800)
committerOliver Kurth <okurth@vmware.com>
Fri, 9 Nov 2018 21:22:25 +0000 (13:22 -0800)
The default, in Linux, is "Linux". If a distoName was present in the
lsb release description file, it should be used.

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

index 1946a5a7e22bce62526afd5d00ac89d5f10eea51..dd795b8ebae4c5ce4f9fa8bed2ea53e2a69da08e 100644 (file)
@@ -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);