From: VMware, Inc <> Date: Wed, 26 Dec 2012 21:23:58 +0000 (-0800) Subject: Add guest OS definitions for Linux 3.X X-Git-Tag: 2012.12.26-958366~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02d93d534fc2f2602dd8d1ddfa11c92d5d0bce16;p=thirdparty%2Fopen-vm-tools.git Add guest OS definitions for Linux 3.X Originally I thought we could do this by aliasing Linux 3.x to Linux 2.6.x, but that only works inbound. Once the guest is identified and aliased to 2.6.x, outbound messages and buttons will incorrectly identify the guest as 2.6.x instead of 3.x, which is sloppy and will be confusing to customers. Instead, this change adds gos table entries for Linux 3.x, which uses the last two (of 64 max) entries in the table. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index 60fe2daca..10dadd06c 100644 --- a/open-vm-tools/lib/include/guest_os.h +++ b/open-vm-tools/lib/include/guest_os.h @@ -202,24 +202,26 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_LINUX_FULL "Other Linux" #define STR_OS_LINUX_PPC "Linux-PPC" #define STR_OS_MANDRAKE "mandrake" -#define STR_OS_MANDRAKE_FULL "Mandrake Linux" -#define STR_OS_MANDRIVA "mandriva" -#define STR_OS_MKLINUX "MkLinux" -#define STR_OS_NOVELL "nld9" +#define STR_OS_MANDRAKE_FULL "Mandrake Linux" +#define STR_OS_MANDRIVA "mandriva" +#define STR_OS_MKLINUX "MkLinux" +#define STR_OS_NOVELL "nld9" #define STR_OS_NOVELL_FULL "Novell Linux Desktop 9" #define STR_OS_ORACLE "oraclelinux" -#define STR_OS_OTHER "otherlinux" -#define STR_OS_OTHER_24 "other24xlinux" +#define STR_OS_OTHER "otherlinux" +#define STR_OS_OTHER_24 "other24xlinux" #define STR_OS_OTHER_24_FULL "Other Linux 2.4.x kernel" -#define STR_OS_OTHER_26 "other26xlinux" +#define STR_OS_OTHER_26 "other26xlinux" #define STR_OS_OTHER_26_FULL "Other Linux 2.6.x kernel" -#define STR_OS_OTHER_FULL "Other Linux" -#define STR_OS_PLD "PLD" -#define STR_OS_RED_HAT "redhat" -#define STR_OS_RED_HAT_EN "rhel" -#define STR_OS_RED_HAT_FULL "Red Hat Linux" -#define STR_OS_SLACKWARE "Slackware" -#define STR_OS_SLES "sles" +#define STR_OS_OTHER_3X "other3xlinux" +#define STR_OS_OTHER_3X_FULL "Other Linux 3.x kernel" +#define STR_OS_OTHER_FULL "Other Linux" +#define STR_OS_PLD "PLD" +#define STR_OS_RED_HAT "redhat" +#define STR_OS_RED_HAT_EN "rhel" +#define STR_OS_RED_HAT_FULL "Red Hat Linux" +#define STR_OS_SLACKWARE "Slackware" +#define STR_OS_SLES "sles" #define STR_OS_SLES_FULL "SUSE Linux Enterprise Server" #define STR_OS_SLES_10 "sles10" #define STR_OS_SLES_10_FULL "SUSE Linux Enterprise Server 10" @@ -233,9 +235,9 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_SMESERVER "SMEServer" #define STR_OS_SUN_DESK "sjds" #define STR_OS_SUN_DESK_FULL "Sun Java Desktop System" -#define STR_OS_TINYSOFA "Tiny Sofa" -#define STR_OS_TURBO "turbolinux" -#define STR_OS_TURBO_FULL "Turbolinux" +#define STR_OS_TINYSOFA "Tiny Sofa" +#define STR_OS_TURBO "turbolinux" +#define STR_OS_TURBO_FULL "Turbolinux" #define STR_OS_UBUNTU "ubuntu" #define STR_OS_ULTRAPENGUIN "UltraPenguin" #define STR_OS_UNITEDLINUX "UnitedLinux" diff --git a/open-vm-tools/lib/include/guest_os_tables.h b/open-vm-tools/lib/include/guest_os_tables.h index ef08b5697..3cfd6bf38 100644 --- a/open-vm-tools/lib/include/guest_os_tables.h +++ b/open-vm-tools/lib/include/guest_os_tables.h @@ -55,6 +55,8 @@ GOT(GUEST_OS_OTHER24XLINUX_64) \ GOT(GUEST_OS_OTHER26XLINUX) \ GOT(GUEST_OS_OTHER26XLINUX_64) \ + GOT(GUEST_OS_OTHER3XLINUX) \ + GOT(GUEST_OS_OTHER3XLINUX_64) \ GOT(GUEST_OS_OTHERLINUX) \ GOT(GUEST_OS_OTHERLINUX_64) \ GOT(GUEST_OS_OTHER) \ @@ -187,6 +189,8 @@ GOSL(STR_OS_OTHER_24 "-64", GUEST_OS_OTHER24XLINUX_64) \ GOSL(STR_OS_OTHER_26, GUEST_OS_OTHER26XLINUX) \ GOSL(STR_OS_OTHER_26 "-64", GUEST_OS_OTHER26XLINUX_64) \ + GOSL(STR_OS_OTHER_3X, GUEST_OS_OTHER3XLINUX) \ + GOSL(STR_OS_OTHER_3X "-64", GUEST_OS_OTHER3XLINUX_64) \ GOSL(STR_OS_OTHER, GUEST_OS_OTHERLINUX) \ GOSL(STR_OS_OTHER "-64", GUEST_OS_OTHERLINUX_64) \ GOSL(STR_OS_DEBIAN_4, GUEST_OS_DEBIAN45) \ diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 3712919f1..f066ff7b4 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -916,9 +916,12 @@ HostinfoOSData(void) } else if (majorVersion == 2 && Hostinfo_OSVersion(1) < 6) { Str_Strcpy(distro, STR_OS_OTHER_24_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER_24, distroSize); - } else { + } else if (majorVersion == 2) { Str_Strcpy(distro, STR_OS_OTHER_26_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER_26, distroSize); + } else { + Str_Strcpy(distro, STR_OS_OTHER_3X_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER_3X, distroSize); } /*