]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Add machine architecture information to os.detailed.data.
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 26 Mar 2021 03:21:17 +0000 (20:21 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 26 Mar 2021 03:21:17 +0000 (20:21 -0700)
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).

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

index a72d4281b606e0a2230f516a250499e56a8e1536..4243e42767893071e1fef51df74d661793971754 100644 (file)
@@ -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,
index fd1a0fd705eca9d8becdac08e8d16e5535e98a52..a595ead6edfd59bc752786910b45bdabc160ab66 100644 (file)
@@ -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__