From: John Wolfe Date: Fri, 26 Mar 2021 03:21:17 +0000 (-0700) Subject: FreeBSD now supports Arm X-Git-Tag: stable-11.3.0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c82f1d9ced8a9c1b13a19256da9d92b64c896906;p=thirdparty%2Fopen-vm-tools.git FreeBSD now supports Arm Upgrade the guest identification code to handle this. --- diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 54bf91d33..65b9619c9 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -2108,34 +2108,12 @@ HostinfoBSD(struct utsname *buf) // IN: * FreeBSD 11 and later are identified using a different guest ID than * older FreeBSD. */ - switch (majorVersion) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - Str_Strcpy(distroShort, STR_OS_FREEBSD, sizeof distroShort); - break; - - case 11: - Str_Strcpy(distroShort, STR_OS_FREEBSD "11", sizeof distroShort); - break; - - case 12: - Str_Strcpy(distroShort, STR_OS_FREEBSD "12", sizeof distroShort); - break; - default: // Unknown defaults to the highest known. - /* FALL THROUGH */ - - case 13: - Str_Strcpy(distroShort, STR_OS_FREEBSD "13", sizeof distroShort); - break; + if (majorVersion < 11) { + Str_Strcpy(distroShort, STR_OS_FREEBSD, sizeof distroShort); + } else { + Str_Sprintf(distroShort, sizeof distroShort, "%s%s%d", + HostinfoArchString(), STR_OS_FREEBSD, majorVersion); } len = Str_Snprintf(osNameFull, sizeof osNameFull, "%s %s", buf->sysname,