]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Tools: Clean up more "structured" left overs
authorOliver Kurth <okurth@vmware.com>
Tue, 4 Sep 2018 22:40:59 +0000 (15:40 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 4 Sep 2018 22:40:59 +0000 (15:40 -0700)
It's now "detailed data".

open-vm-tools/lib/misc/hostinfo.c
open-vm-tools/lib/misc/hostinfoInt.h
open-vm-tools/lib/misc/hostinfoPosix.c
open-vm-tools/services/plugins/guestInfo/guestInfoServer.c

index 996a54b66379eacdfd80359318360589024c02e0..e5ed4b6e23151c1cdffb1dc2ffd9d632567f0225 100644 (file)
@@ -312,7 +312,7 @@ Hostinfo_GetOSGuestString(void)
  *      detailed information about the guest OS.
  *
  * Return value:
- *      NULL  Unable to obtain the structured string.
+ *      NULL  Unable to obtain the detailed data.
  *     !NULL  The detailed data string. The caller must free it.
  *
  * Side effects:
index 8219e59650cd2d6f8282005345663057f4475623..f991ea87010fc7c57bfe35ec3ee0a236c9166461 100644 (file)
@@ -29,7 +29,7 @@
 #define MAX_OS_FULLNAME_LEN 512
 #define MAX_DETAILED_FIELD_LEN 1024
 
-#define DETAILED_STRING_DELIMITER " "
+#define DETAILED_DATA_DELIMITER " "
 
 
 /*
@@ -41,7 +41,7 @@ typedef struct {
    char   value[MAX_DETAILED_FIELD_LEN];
 } DetailedDataField;
 
-/* Must be sorted. Keep in same ordering as structuredFields */
+/* Must be sorted. Keep in same ordering as detailedDataFields */
 typedef enum {
    BITNESS,
    BUILD_NUMBER,
index 4f6dd2cedf7eccd7fc8ef7b12c08cfd769e9cba9..077dbfbe384e964bf4dfca2e73354a0c7130461c 100644 (file)
@@ -581,7 +581,7 @@ HostinfoOSDetailedData(void)
          len = Str_Snprintf(fieldString, sizeof fieldString, "%s='%s'",
                             field->name, escapedString);
          if (len == -1) {
-            Warning("%s: Error: structured info field too large\n",
+            Warning("%s: Error: detailed data field too large\n",
                     __FUNCTION__);
             memset(hostinfoCachedDetailedData, '\0',
                    sizeof hostinfoCachedDetailedData);
@@ -594,7 +594,7 @@ HostinfoOSDetailedData(void)
          /* Add delimiter between properties */
          if ((field + 1)->name != NULL) {
             Str_Strcat(hostinfoCachedDetailedData,
-                       DETAILED_STRING_DELIMITER,
+                       DETAILED_DATA_DELIMITER,
                        sizeof hostinfoCachedDetailedData);
          }
       }
@@ -1231,7 +1231,7 @@ HostinfoOsRelease(char *distro,       // OUT:
                                     &osReleaseFields[0],
                                     distroSize, distro);
 
-   /* These are used for the structured string. They can fail */
+   /* These are used for the detailed data. They can fail */
    HostinfoReadDistroFile(TRUE, fileName, &osReleaseFields[1],
                           sizeof distroName, distroName);
    HostinfoReadDistroFile(TRUE, fileName, &osReleaseFields[2],
@@ -1736,7 +1736,7 @@ HostinfoOSData(void)
    }
 #endif
 
-   /* Build structured string */
+   /* Build detailed data */
    HostinfoOSDetailedData();
 
    return success;
index 35c8abfb80d99d15299dc537517102df6bf29105..e6578af08f21be7bd599799de29a70c408116ff1 100644 (file)
@@ -468,7 +468,7 @@ GuestInfoResetNicExcludeList(ToolsAppCtx *ctx)
  ******************************************************************************
  * GuestInfoDetailedDataIsEqual --
  *
- *    Compares two HostinfoDetailedDataHeader and the structured string that
+ *    Compares two HostinfoDetailedDataHeader and the detailed data that
  *    follows each header.
  *
  * @returns True if equal
@@ -496,8 +496,8 @@ GuestInfoDetailedDataIsEqual(const HostinfoDetailedDataHeader *info1,  // IN:
  ******************************************************************************
  * GuestInfoFreeDetailedData --
  *
- * Free the HostinfoStructuredHeader and space allocated for the structured
- * string.
+ * Free the HostinfoStructuredHeader and space allocated for the detailed
+ * data.
  *
  * @returns None
  *
@@ -592,26 +592,26 @@ GuestInfoGather(gpointer data)
       }
 
       if (detailedGosData == NULL) {
-         g_message("No structured data.\n");
+         g_debug("No detailed data.\n");
          sendOsNames = TRUE;
          gSendDetailedGosData = FALSE;
       } else {
-         /* Build and attempt to send the structured data */
+         /* Build and attempt to send the detailed data */
          HostinfoDetailedDataHeader *detailedDataHeader = NULL;
          size_t infoHeaderSize;
          size_t detailedGosDataLen;
          size_t infoSize;
 
-         g_message("Sending structured OS info.\n");
+         g_debug("Sending detailed data.\n");
          detailedGosDataLen = strlen(detailedGosData);
          infoHeaderSize = sizeof *detailedDataHeader;
          infoSize = infoHeaderSize + detailedGosDataLen + 1; // cover NUL
 
          detailedDataHeader = g_malloc(infoSize);
-         /* Clear struct and memory allocated for structured string */
+         /* Clear struct and memory allocated for detailed data */
          memset(detailedDataHeader, 0, infoSize);
 
-         /* Set the version of the structured header used */
+         /* Set the version of the detailed data header used */
          detailedDataHeader->version = HOSTINFO_STRUCT_HEADER_VERSION;
 
          if (osName == NULL) {
@@ -636,8 +636,10 @@ GuestInfoGather(gpointer data)
             gInfoCache.detailedData = detailedDataHeader;
             g_debug("Detailed data was sent successfully.\n");
          } else {
-            /* Only send the OS Name if the VMX failed to receive the
-             * structured OS info. */
+            /*
+             * Only send the OS Name if the VMX failed to receive the detailed
+             * data
+             */
             gSendDetailedGosData = FALSE;
             sendOsNames = TRUE;
             g_debug("Detailed data was not sent successfully.\n");
@@ -1264,7 +1266,7 @@ GuestInfoUpdateVMX(ToolsAppCtx *ctx,        // IN: Application context
          }
 
          if (!GuestInfoSendData(ctx, info, infoSize, INFO_OS_DETAILED)) {
-            g_warning("Failed to update structured OS information.\n");
+            g_warning("Failed to update detailed data");
             return FALSE;
          }
          break;