]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Internal branch sync. Included in this change:
authorVMware, Inc <>
Thu, 2 Aug 2012 05:23:51 +0000 (22:23 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Thu, 2 Aug 2012 18:07:54 +0000 (11:07 -0700)
. Allow Mac code to be able to override the expansion of '~'

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

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/loglevel_user.h
open-vm-tools/lib/include/vm_version.h
open-vm-tools/lib/include/win32util.h
open-vm-tools/lib/include/x86cpuid.h
open-vm-tools/lib/misc/util_misc.c

index 0fb4bdbc822226893b9cf5960a7e6a835790003f..b8f2ad065ddd15d2a36550dabad0398e64522f3e 100644 (file)
    LOGLEVEL_VAR(grainTrack), \
    LOGLEVEL_VAR(shim3D), \
    LOGLEVEL_VAR(crc32), \
+   LOGLEVEL_VAR(vmkmgmtlib), \
    /* end of list */
 
 LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER);
index 4316359ec5b2a1a56960e4cfc6f795baf6b3f20d..ae2187409fcec9ade3b5ac647999cea02814ac99 100644 (file)
 #define WORKSTATION_VERSION "e.x.p"
 #define WORKSTATION_RELEASE_DESCRIPTION ""
 #define WORKSTATION_ENTERPRISE_VERSION "e.x.p"
+#define WSX_SERVER_VERSION_NUMBER "1.0.0"
+#define WSX_SERVER_VERSION "e.x.p"
 #define ACE_MANAGEMENT_SERVER_VERSION "e.x.p"
 #define MUI_VERSION "4.1.0"
 #define CONSOLE_VERSION "4.1.0"
 #define P2V_FILE_VERSION 3,0,0,0
 #define PLAYER_VERSION_NUMBER "4.0.0" /* this version number should always match real Player version number */
 #define PLAYER_VERSION "e.x.p"
-#define V2V_VERSION "e.x.p"
-#define V2V_FILE_VERSION 1,0,0,0
+
 /*
  * When updating FUSION_VERSION from e.x.p to GA, you will also need to update
  * lastVersion{Major,Minor,Patch} in bora/scons/package/fusion/fusion.sc
 #  define PRODUCT_VERSION_NUMBER SDK_VERSION
 #elif defined(VMX86_P2V)
 #  define PRODUCT_VERSION_NUMBER P2V_VERSION
-#elif defined(VMX86_V2V)
-#  define PRODUCT_VERSION_NUMBER V2V_VERSION
 #elif defined(VMX86_VIPERL)
 #  define PRODUCT_VERSION_NUMBER VIPERL_VERSION
 #elif defined(VMX86_SYSIMAGE)
 #    define PRODUCT_LICENSE_VERSION "1.0"
 #  elif defined(VMX86_P2V)
 #    define PRODUCT_LICENSE_VERSION "1.0"
-#  elif defined(VMX86_V2V)
-#    define PRODUCT_LICENSE_VERSION "1.0"
 #  else
 #    define PRODUCT_LICENSE_VERSION "0.0"
 #  endif
index 255ca515e617fddb64aa469997d0f99b659db849..ea04c1fc88d180c44132f5a4aefd86806e85adbf 100644 (file)
@@ -229,7 +229,7 @@ Bool W32Util_DismountVolumes(uint16 drive,
                              uint64 offset,
                              uint64 size,
                              void **handle);
-void W32Util_CloseDismountHandle(void *handle);
+Bool W32Util_CloseDismountHandle(void *handle);
 
 Bool W32Util_EnableSafePathSearching(void);
 
index 158a4d6584c019fe7fb3738339e49c360672377a..a4e804729563ab3866fe172d8818343b7c61b30b 100644 (file)
@@ -164,7 +164,9 @@ enum {
 
 
 /* Named feature leaves */
+#define CPUID_FEATURE_INFORMATION  0x01
 #define CPUID_MWAIT_FEATURES       5
+#define CPUID_HYPERVISOR_LEVEL_0   0x40000000
 #define CPUID_SVM_FEATURES         0x8000000a
 
 
index 9b577ad16a343a98af91d67be3f33273d15cbac3..45c9da15ce9a941e812ad8c5aeb2fd959af62d5f 100644 (file)
@@ -601,16 +601,16 @@ UtilGetLoginName(struct passwd *pwd) // IN/OPT: user passwd struct
  *
  * UtilDoTildeSubst --
  *
- *     Given a string following a tilde, this routine returns the
- *     corresponding home directory.
+ *      Given a string following a tilde, this routine returns the
+ *      corresponding home directory.
  *
  * Results:
- *     The result is a pointer to a static string containing the home
- *     directory in native format.  The returned string is a newly
- *      allocated string which may/must be freed by the caller
+ *      A string containing the home directory in native format. The
+ *      returned string is a newly allocated string which may/must be
+ *      freed by the caller.
  *
  * Side effects:
- *     Information may be left in resultPtr.
+ *      None.
  *
  * Credit: derived from J.K.Ousterhout's Tcl
  *----------------------------------------------------------------------
@@ -628,9 +628,17 @@ UtilDoTildeSubst(ConstUnicode user)  // IN: name of user
        * The HOME environment variable is not always set on Mac OS.
        * (was bug 841728)
        */
-      pwd = Posix_Getpwuid(getuid());
-      if (pwd == NULL) {
-         Log("Could not get passwd for current user.\n");
+#if defined(VMX86_DEVEL)
+      /*
+       * Allow code to override the tilde expansion for things like unit tests.
+       */
+      str = Unicode_Duplicate(Posix_Getenv("VMWARE_HOMEDIR_OVERRIDE"));
+#endif // defined(VMX86_DEVEL)
+      if (str == NULL) {
+         pwd = Posix_Getpwuid(getuid());
+         if (pwd == NULL) {
+            Log("Could not get passwd for current user.\n");
+         }
       }
 #else // !defined(__APPLE__)
       str = Unicode_Duplicate(Posix_Getenv("HOME"));