]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Internal branch sync. Included in this change:
authorVMware, Inc <>
Wed, 26 Jan 2011 01:45:09 +0000 (17:45 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 26 Jan 2011 01:45:09 +0000 (17:45 -0800)
. VIX: more solaris fixes.

. changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/misc/hostType.c
open-vm-tools/services/plugins/vix/vixTools.c

index 1d42d362f0791608873666426bc837c52ebefda1..cb05e840b73641fd49fe5a51187c8d9d8e06bd7f 100644 (file)
 #include "hostType.h"
 #include "str.h"
 
-#if defined(VMX86_SERVER) || (defined(VMX86_VPX) && defined(linux))
+/*
+ * XXX see bug 651592 for how to make this not warn on newer linux hosts
+ * that have deprecated sysctl.
+ */
+#if defined(VMX86_SERVER) || ((defined(VMX86_VPX) || defined(VMX86_VMACORE)) && defined(linux))
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #include "uwvmkAPI.h"
+#define DO_REAL_HOST_CHECK
 #endif
 
 #define LGPFX "HOSTTYPE:"
@@ -66,7 +71,7 @@
 static int
 HostTypeOSVMKernelType(void)
 {
-#if defined(VMX86_SERVER) || (defined(VMX86_VPX) && defined(linux))
+#ifdef DO_REAL_HOST_CHECK
    static int vmkernelType = -1;
 
    if (vmkernelType == -1) {
@@ -113,7 +118,7 @@ HostTypeOSVMKernelType(void)
 
    return (vmkernelType);
 #else
-   /* Non-ESX builds are never running on the VMKernel. */
+   /* Non-linux builds are never running in a userworld */
    return 0;
 #endif
 }
index 28528565733e866bbbd223d87ed43ecba3bc1e12..837dbb923ba31ad5814277225ecb010c2b781551 100644 (file)
@@ -5757,7 +5757,7 @@ abort:
 VixError
 VixToolsSetFileAttributes(VixCommandRequestHeader *requestMsg)    // IN
 {
-#if (defined(_WIN32) || defined(__linux__))
+#if (defined(_WIN32) || defined(__linux__) || defined(sun))
    VixError err = VIX_OK;
    Bool impersonatingVMWareUser = FALSE;
    void *userToken = NULL;
@@ -5837,7 +5837,7 @@ VixToolsSetFileAttributes(VixCommandRequestHeader *requestMsg)    // IN
    }
 #else
    if (windowsAttributeSpecified) {
-      Debug("%s: Invalid attributes received for Unix Guest\n",
+      Debug("%s: Invalid attributes received for Posix Guest\n",
             __FUNCTION__);
       err = VIX_E_INVALID_ARG;
       goto abort;