From: Oliver Kurth Date: Tue, 26 May 2020 22:32:57 +0000 (-0700) Subject: Common source file changes not directly applicable to open-vm-tools X-Git-Tag: stable-11.2.0~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecdd9001cf809b2ce359f07f8b84d54cd436a573;p=thirdparty%2Fopen-vm-tools.git Common source file changes not directly applicable to open-vm-tools Pre-enable RHEL 9, CentOS 9, Oracle 9, and Asianux 9 guests --- diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index 3f8744523..0b28e35bf 100644 --- a/open-vm-tools/lib/include/guest_os.h +++ b/open-vm-tools/lib/include/guest_os.h @@ -248,30 +248,14 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_ARCH "Arch" #define STR_OS_ARKLINUX "Arklinux" #define STR_OS_ASIANUX "asianux" -#define STR_OS_ASIANUX_3 "asianux3" -#define STR_OS_ASIANUX_4 "asianux4" -#define STR_OS_ASIANUX_5 "asianux5" -#define STR_OS_ASIANUX_7 "asianux7" -#define STR_OS_ASIANUX_8 "asianux8" #define STR_OS_AUROX "Aurox" #define STR_OS_BLACKCAT "BlackCat" #define STR_OS_CENTOS "centos" -#define STR_OS_CENTOS6 "centos6" -#define STR_OS_CENTOS7 "centos7" -#define STR_OS_CENTOS8 "centos8" #define STR_OS_CRXPOD "CRXPod" #define STR_OS_CRXSYS "CRXSys" #define STR_OS_COBALT "Cobalt" #define STR_OS_CONECTIVA "Conectiva" -#define STR_OS_DEBIAN "Debian" -#define STR_OS_DEBIAN_4 "debian4" -#define STR_OS_DEBIAN_5 "debian5" -#define STR_OS_DEBIAN_6 "debian6" -#define STR_OS_DEBIAN_7 "debian7" -#define STR_OS_DEBIAN_8 "debian8" -#define STR_OS_DEBIAN_9 "debian9" -#define STR_OS_DEBIAN_10 "debian10" -#define STR_OS_DEBIAN_11 "debian11" +#define STR_OS_DEBIAN "debian" #define STR_OS_FEDORA "Fedora" #define STR_OS_GENTOO "Gentoo" #define STR_OS_IMMUNIX "Immunix" @@ -286,9 +270,6 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_MKLINUX "MkLinux" #define STR_OS_NOVELL "nld9" #define STR_OS_NOVELL_FULL "Novell Linux Desktop 9" -#define STR_OS_ORACLE6 "oraclelinux6" -#define STR_OS_ORACLE7 "oraclelinux7" -#define STR_OS_ORACLE8 "oraclelinux8" #define STR_OS_ORACLE "oraclelinux" #define STR_OS_OTHER "otherlinux" #define STR_OS_OTHER_FULL "Other Linux" diff --git a/open-vm-tools/lib/include/guest_os_tables.h b/open-vm-tools/lib/include/guest_os_tables.h index fd28f8d20..661a2da8d 100644 --- a/open-vm-tools/lib/include/guest_os_tables.h +++ b/open-vm-tools/lib/include/guest_os_tables.h @@ -126,12 +126,14 @@ extern "C" { GOT(GUEST_OS_ORACLE6_64) \ GOT(GUEST_OS_ORACLE7_64) \ GOT(GUEST_OS_ORACLE8_64) \ + GOT(GUEST_OS_ORACLE9_64) \ GOT(GUEST_OS_CENTOS) \ GOT(GUEST_OS_CENTOS_64) \ GOT(GUEST_OS_CENTOS6) \ GOT(GUEST_OS_CENTOS6_64) \ GOT(GUEST_OS_CENTOS7_64) \ GOT(GUEST_OS_CENTOS8_64) \ + GOT(GUEST_OS_CENTOS9_64) \ GOT(GUEST_OS_AMAZONLINUX2_64) \ GOT(GUEST_OS_CRXSYS1_64) /* VMware CRX system VM 1.0 64-bit */ \ GOT(GUEST_OS_CRXPOD1_64) /* VMware CRX pod VM 1.0 64-bit */ \ diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 26f3ca7d5..7b37f8686 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -913,19 +913,22 @@ HostinfoGetOSShortName(const char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_ARKLINUX, distroShortSize); } else if (strstr(distroLower, "asianux server 3") || strstr(distroLower, "asianux client 3")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_3, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX "3" , distroShortSize); } else if (strstr(distroLower, "asianux server 4") || strstr(distroLower, "asianux client 4")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_4, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX "4", distroShortSize); } else if (strstr(distroLower, "asianux server 5") || strstr(distroLower, "asianux client 5")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX "5", distroShortSize); } else if (strstr(distroLower, "asianux server release 7") || strstr(distroLower, "asianux client release 7")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX "7", distroShortSize); } else if (strstr(distroLower, "asianux server release 8") || strstr(distroLower, "asianux client release 8")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_8, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX "8", distroShortSize); + } else if (strstr(distroLower, "asianux server release 9") || + strstr(distroLower, "asianux client release 9")) { + Str_Strcpy(distroShort, STR_OS_ASIANUX "9", distroShortSize); } else if (strstr(distroLower, "aurox")) { Str_Strcpy(distroShort, STR_OS_AUROX, distroShortSize); } else if (strstr(distroLower, "black cat")) { @@ -943,7 +946,7 @@ HostinfoGetOSShortName(const char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_CONECTIVA, distroShortSize); } else if (strstr(distroLower, "debian")) { if (version <= 4) { - Str_Strcpy(distroShort, STR_OS_DEBIAN_4, distroShortSize); + Str_Strcpy(distroShort, STR_OS_DEBIAN "4", distroShortSize); } else { Str_Sprintf(distroShort, distroShortSize, "%s%d", STR_OS_DEBIAN, version); @@ -1500,6 +1503,10 @@ HostinfoDefaultLinux(char *distro, // OUT/OPT: case 4: distroOut = STR_OS_OTHER_4X_FULL; distroShortOut = STR_OS_OTHER_4X; + + case 5: + distroOut = STR_OS_OTHER_5X_FULL; + distroShortOut = STR_OS_OTHER_5X; break; default: