]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
hostinfo: More cleanup
authorOliver Kurth <okurth@vmware.com>
Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)
committerOliver Kurth <okurth@vmware.com>
Fri, 26 Jan 2018 23:04:36 +0000 (15:04 -0800)
Continue the prep for Amazon Linux.

open-vm-tools/lib/include/hostinfo.h
open-vm-tools/lib/misc/hostinfoPosix.c

index fcd346acd376d4eb4ad951464e6d8c89a41d46ea..6d456a4d47bbeec9749cbeebe09c0f2111bfa9ef 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018 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
@@ -47,8 +47,10 @@ typedef enum {
 
 HostinfoProcessQuery Hostinfo_QueryProcessExistence(int pid);
 
-char *Hostinfo_NameGet(void);  /* don't free result */
-char *Hostinfo_HostName(void); /* free result */
+char *Hostinfo_NameGet(void);           // Don't free result
+char *Hostinfo_HostName(void);          // free result
+char *Hostinfo_GetOSName(void);         // free result
+char *Hostinfo_GetOSGuestString(void);  // free result
 
 void Hostinfo_MachineID(uint32 *hostNameHash,
                         uint64 *hostHardwareID);
index b228b0bc5e7a18a20ae60a9db98ee964d62a2f26..1f2965945250088c09bc0142c3a2a7589428cff6 100644 (file)
@@ -1182,11 +1182,10 @@ HostinfoLinux(struct utsname *buf)  // IN:
 
    if (len != -1) {
       if (Hostinfo_GetSystemBitness() == 64) {
-         len = Str_Snprintf(osName, sizeof osName, "%s%d%s", distroShort,
-                            Hostinfo_OSVersion(0), STR_OS_64BIT_SUFFIX);
+         len = Str_Snprintf(osName, sizeof osName, "%s%s", distroShort,
+                            STR_OS_64BIT_SUFFIX);
       } else {
-         len = Str_Snprintf(osName, sizeof osName, "%s%d", distroShort,
-                            Hostinfo_OSVersion(0));
+         len = Str_Snprintf(osName, sizeof osName, "%s", distroShort);
       }
    }
 
@@ -1250,11 +1249,10 @@ HostinfoBSD(struct utsname *buf)  // IN:
 
    if (len != -1) {
       if (Hostinfo_GetSystemBitness() == 64) {
-         len = Str_Snprintf(osName, sizeof osName, "%s%d%s", distroShort,
-                            Hostinfo_OSVersion(0), STR_OS_64BIT_SUFFIX);
+         len = Str_Snprintf(osName, sizeof osName, "%s%s", distroShort,
+                            STR_OS_64BIT_SUFFIX);
       } else {
-         len = Str_Snprintf(osName, sizeof osName, "%s%d", distroShort,
-                            Hostinfo_OSVersion(0));
+         len = Str_Snprintf(osName, sizeof osName, "%s", distroShort);
       }
    }