From: John Wolfe Date: Fri, 26 Mar 2021 03:21:17 +0000 (-0700) Subject: Add machine architecture information to os.detailed.data. X-Git-Tag: stable-11.3.0~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6b98a52e69488006fef87c63a3cc186ab3d9525;p=thirdparty%2Fopen-vm-tools.git Add machine architecture information to os.detailed.data. The detailed data now include information about the guest's running machine architecture. A later change will deal with the guest "short name" (a.k.a. the guestOS string). --- diff --git a/open-vm-tools/lib/misc/hostinfoInt.h b/open-vm-tools/lib/misc/hostinfoInt.h index a72d4281b..4243e4276 100644 --- a/open-vm-tools/lib/misc/hostinfoInt.h +++ b/open-vm-tools/lib/misc/hostinfoInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2019 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2021 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -40,6 +40,7 @@ typedef struct { /* Must be sorted. Keep in same ordering as detailedDataFields */ typedef enum { + ARCH, BITNESS, BUILD_NUMBER, DISTRO_NAME, diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index fd1a0fd70..a595ead6e 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -247,14 +247,19 @@ static const DistroInfo distroArray[] = { /* Must be sorted. Keep in the same ordering as DetailedDataFieldType */ DetailedDataField detailedDataFields[] = { - { "bitness", "" }, // "32" or "64" - { "buildNumber", "" }, // Present for MacOS and some Linux distros. - { "distroName", "" }, // Defaults to uname -s - { "distroVersion", "" }, // Present for MacOS. Read from distro files for Linux. - { "familyName", "" }, // Defaults to uname -s - { "kernelVersion", "" }, // Defaults to uname -r - { "prettyName", "" }, // Present for MacOS. Read from distro files for Linux. - { NULL, "" }, // MUST BE LAST +#if defined(VM_ARM_ANY) + { "architecture", "Arm" }, // Arm +#else + { "architecture", "X86" }, // Intel/X86 +#endif + { "bitness", "" }, // "32" or "64" + { "buildNumber", "" }, // Present for MacOS and some Linux distros. + { "distroName", "" }, // Defaults to uname -s + { "distroVersion", "" }, // Present for MacOS. + { "familyName", "" }, // Defaults to uname -s + { "kernelVersion", "" }, // Defaults to uname -r + { "prettyName", "" }, // Present for MacOS. + { NULL, "" }, // MUST BE LAST }; #if defined __ANDROID__ || defined __aarch64__