]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
2008.06.20-100027 2008.06.20-100027
authorElliot Lee <elliot@elliot-dev1.eng.vmware.com>
Mon, 30 Jun 2008 23:56:48 +0000 (16:56 -0700)
committerElliot Lee <elliot@elliot-dev1.eng.vmware.com>
Mon, 30 Jun 2008 23:56:48 +0000 (16:56 -0700)
253 files changed:
open-vm-tools/ChangeLog
open-vm-tools/FILES
open-vm-tools/Makefile.am
open-vm-tools/Makefile.in
open-vm-tools/NEWS
open-vm-tools/checkvm/Makefile.in
open-vm-tools/configure
open-vm-tools/configure.ac
open-vm-tools/guestd/Makefile.am
open-vm-tools/guestd/Makefile.in
open-vm-tools/guestd/debugStdio.c
open-vm-tools/guestd/foreignVMToolsNetworking.c
open-vm-tools/guestd/foundryToolsDaemon.c
open-vm-tools/guestd/main.c
open-vm-tools/guestd/toolsDaemon.c
open-vm-tools/hgfsclient/Makefile.am
open-vm-tools/hgfsclient/Makefile.in
open-vm-tools/hgfsclient/stub-user-util.c [new file with mode: 0644]
open-vm-tools/hgfsmounter/Makefile.am
open-vm-tools/hgfsmounter/Makefile.in
open-vm-tools/hgfsmounter/hgfsmounter.c
open-vm-tools/hgfsmounter/stub-user-util.c [new file with mode: 0644]
open-vm-tools/lib/Makefile.am
open-vm-tools/lib/Makefile.in
open-vm-tools/lib/SLPv2Parser/Makefile.in
open-vm-tools/lib/auth/Makefile.in
open-vm-tools/lib/backdoor/Makefile.in
open-vm-tools/lib/backdoor/shared/Makefile.in
open-vm-tools/lib/conf/Makefile.in
open-vm-tools/lib/deployPkg/Makefile.in
open-vm-tools/lib/dict/Makefile.in
open-vm-tools/lib/dnd/Makefile.in
open-vm-tools/lib/dynxdr/Makefile.am [new file with mode: 0644]
open-vm-tools/lib/dynxdr/Makefile.in [new file with mode: 0644]
open-vm-tools/lib/dynxdr/dynxdr.c [new file with mode: 0644]
open-vm-tools/lib/dynxdr/xdrutil.c [new file with mode: 0644]
open-vm-tools/lib/err/Makefile.in
open-vm-tools/lib/eventManager/Makefile.in
open-vm-tools/lib/file/Makefile.in
open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/file/fileLockPosix.c
open-vm-tools/lib/file/fileLockPrimitive.c
open-vm-tools/lib/foundryMsg/Makefile.in
open-vm-tools/lib/foundryMsg/foundryMsg.c
open-vm-tools/lib/ghIntegrationStub/Makefile.in
open-vm-tools/lib/guestApp/Makefile.in
open-vm-tools/lib/guestApp/guestApp.c
open-vm-tools/lib/guestInfo/Makefile.am
open-vm-tools/lib/guestInfo/Makefile.in
open-vm-tools/lib/guestInfo/guestInfo.c [new file with mode: 0644]
open-vm-tools/lib/guestInfo/guestInfoPerfMonLinux.c
open-vm-tools/lib/guestInfo/guestInfoPosix.c
open-vm-tools/lib/guestInfo/guestInfoServer.c
open-vm-tools/lib/guestRpc/Makefile.am [new file with mode: 0644]
open-vm-tools/lib/guestRpc/Makefile.in [new file with mode: 0644]
open-vm-tools/lib/guestRpc/nicinfo.x [new file with mode: 0644]
open-vm-tools/lib/hgfs/Makefile.in
open-vm-tools/lib/hgfs/hgfsUtil.c
open-vm-tools/lib/hgfsBd/Makefile.in
open-vm-tools/lib/hgfsBd/hgfsBd.c
open-vm-tools/lib/hgfsServer/Makefile.in
open-vm-tools/lib/hgfsServer/hgfsServer.c
open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in
open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c
open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in
open-vm-tools/lib/impersonate/Makefile.in
open-vm-tools/lib/impersonate/impersonatePosix.c
open-vm-tools/lib/include/buildNumber.h
open-vm-tools/lib/include/codeset.h
open-vm-tools/lib/include/conf.h
open-vm-tools/lib/include/cpuid_info.h
open-vm-tools/lib/include/dnd.h
open-vm-tools/lib/include/dndGuest.h [new file with mode: 0644]
open-vm-tools/lib/include/dynxdr.h [new file with mode: 0644]
open-vm-tools/lib/include/fileInt.h
open-vm-tools/lib/include/file_extensions.h
open-vm-tools/lib/include/ghIntegration.h
open-vm-tools/lib/include/guestApp.h
open-vm-tools/lib/include/guestInfo.h
open-vm-tools/lib/include/guestInfoInt.h
open-vm-tools/lib/include/guestStats.h
open-vm-tools/lib/include/hgfs.h
open-vm-tools/lib/include/hgfsBd.h
open-vm-tools/lib/include/hgfsProto.h
open-vm-tools/lib/include/hgfsServerInt.h
open-vm-tools/lib/include/hgfsUtil.h
open-vm-tools/lib/include/hostinfo.h
open-vm-tools/lib/include/loglevel_user.h
open-vm-tools/lib/include/netutil.h
open-vm-tools/lib/include/panic.h
open-vm-tools/lib/include/posix.h
open-vm-tools/lib/include/resolution.h [new file with mode: 0644]
open-vm-tools/lib/include/rpcin.h
open-vm-tools/lib/include/unicodeBase.h
open-vm-tools/lib/include/unicodeInt.h
open-vm-tools/lib/include/unicodeOperations.h
open-vm-tools/lib/include/unicodeTypes.h
open-vm-tools/lib/include/unity.h
open-vm-tools/lib/include/util.h
open-vm-tools/lib/include/vix.h
open-vm-tools/lib/include/vixTools.h
open-vm-tools/lib/include/vm_app.h
open-vm-tools/lib/include/vm_basic_asm_x86.h
open-vm-tools/lib/include/vm_basic_asm_x86_64.h
open-vm-tools/lib/include/vm_basic_defs.h
open-vm-tools/lib/include/vm_product.h
open-vm-tools/lib/include/vm_tools_version.h
open-vm-tools/lib/include/vm_version.h
open-vm-tools/lib/include/vmxrpc.h [new file with mode: 0644]
open-vm-tools/lib/include/wiper.h
open-vm-tools/lib/include/x86cpuid.h
open-vm-tools/lib/include/xdrutil.h [new file with mode: 0644]
open-vm-tools/lib/message/Makefile.in
open-vm-tools/lib/message/shared/Makefile.in
open-vm-tools/lib/misc/Makefile.in
open-vm-tools/lib/misc/codeset.c
open-vm-tools/lib/misc/codesetOld.c
open-vm-tools/lib/misc/codesetOld.h
open-vm-tools/lib/misc/hashTable.c
open-vm-tools/lib/misc/hostname.c
open-vm-tools/lib/misc/posixPosix.c
open-vm-tools/lib/misc/shared/Makefile.in
open-vm-tools/lib/misc/timeutil.c
open-vm-tools/lib/netUtil/Makefile.am
open-vm-tools/lib/netUtil/Makefile.in
open-vm-tools/lib/netUtil/netUtilLinux.c
open-vm-tools/lib/panic/Makefile.in
open-vm-tools/lib/panic/panic.c
open-vm-tools/lib/panicDefault/Makefile.in
open-vm-tools/lib/printer/Makefile.in
open-vm-tools/lib/procMgr/Makefile.in
open-vm-tools/lib/resolution/Makefile.am [new file with mode: 0644]
open-vm-tools/lib/resolution/Makefile.in [new file with mode: 0644]
open-vm-tools/lib/resolution/libvmwarectrl.c [new file with mode: 0644]
open-vm-tools/lib/resolution/libvmwarectrl.h [new file with mode: 0644]
open-vm-tools/lib/resolution/resolution.c [new file with mode: 0644]
open-vm-tools/lib/resolution/resolutionInt.h [new file with mode: 0644]
open-vm-tools/lib/resolution/resolutionX11.c [new file with mode: 0644]
open-vm-tools/lib/resolution/vmwarectrl.h [new file with mode: 0644]
open-vm-tools/lib/resolution/vmwarectrlproto.h [new file with mode: 0644]
open-vm-tools/lib/rpcIn/Makefile.in
open-vm-tools/lib/rpcIn/rpcin.c
open-vm-tools/lib/rpcOut/Makefile.in
open-vm-tools/lib/rpcOut/shared/Makefile.in
open-vm-tools/lib/rpcVmx/Makefile.in
open-vm-tools/lib/socketMgr/Makefile.in
open-vm-tools/lib/strUtil/Makefile.in
open-vm-tools/lib/string/Makefile.in
open-vm-tools/lib/string/shared/Makefile.in
open-vm-tools/lib/string/str.c
open-vm-tools/lib/stubs/Makefile.am [new file with mode: 0644]
open-vm-tools/lib/stubs/Makefile.in [new file with mode: 0644]
open-vm-tools/lib/stubs/shared/Makefile.am [new file with mode: 0644]
open-vm-tools/lib/stubs/shared/Makefile.in [new file with mode: 0644]
open-vm-tools/lib/stubs/stub-config.c [new file with mode: 0644]
open-vm-tools/lib/stubs/stub-log.c [new file with mode: 0644]
open-vm-tools/lib/stubs/stub-user-msg.c [new file with mode: 0644]
open-vm-tools/lib/stubs/stub-user-panic.c [new file with mode: 0644]
open-vm-tools/lib/stubs/stub-warning.c [new file with mode: 0644]
open-vm-tools/lib/sync/Makefile.in
open-vm-tools/lib/sync/shared/Makefile.in
open-vm-tools/lib/sync/syncMutex.c
open-vm-tools/lib/syncDriver/Makefile.in
open-vm-tools/lib/system/Makefile.in
open-vm-tools/lib/system/systemLinux.c
open-vm-tools/lib/toolsLogger/Makefile.in
open-vm-tools/lib/unicode/Makefile.in
open-vm-tools/lib/unicode/unicodeCommon.c
open-vm-tools/lib/unicode/unicodeSimpleBase.c
open-vm-tools/lib/unicode/unicodeSimpleTypes.c
open-vm-tools/lib/unityStub/Makefile.am
open-vm-tools/lib/unityStub/Makefile.in
open-vm-tools/lib/unityStub/unityStub.c
open-vm-tools/lib/user/Makefile.in
open-vm-tools/lib/user/hostinfo.c
open-vm-tools/lib/user/hostinfoPosix.c
open-vm-tools/lib/user/util.c
open-vm-tools/lib/vixTools/Makefile.am
open-vm-tools/lib/vixTools/Makefile.in
open-vm-tools/lib/vixTools/vixTools.c
open-vm-tools/lib/vmBackupLib/Makefile.in
open-vm-tools/lib/vmCheck/Makefile.in
open-vm-tools/lib/vmSignal/Makefile.in
open-vm-tools/lib/wiper/Makefile.in
open-vm-tools/libguestlib/Makefile.am
open-vm-tools/libguestlib/Makefile.in
open-vm-tools/modules/Makefile.in
open-vm-tools/modules/freebsd/vmblock/Makefile
open-vm-tools/modules/freebsd/vmblock/compat_freebsd.h [new file with mode: 0644]
open-vm-tools/modules/freebsd/vmblock/compat_vop.h [new file with mode: 0644]
open-vm-tools/modules/freebsd/vmblock/vfsops.c
open-vm-tools/modules/freebsd/vmblock/vm_basic_defs.h
open-vm-tools/modules/freebsd/vmblock/vnops.c
open-vm-tools/modules/freebsd/vmhgfs/Makefile
open-vm-tools/modules/freebsd/vmhgfs/compat_freebsd.h [new file with mode: 0644]
open-vm-tools/modules/freebsd/vmhgfs/compat_vop.h [new file with mode: 0644]
open-vm-tools/modules/freebsd/vmhgfs/hgfs.h
open-vm-tools/modules/freebsd/vmhgfs/hgfsBd.c
open-vm-tools/modules/freebsd/vmhgfs/hgfsBd.h
open-vm-tools/modules/freebsd/vmhgfs/hgfsProto.h
open-vm-tools/modules/freebsd/vmhgfs/hgfsUtil.c
open-vm-tools/modules/freebsd/vmhgfs/hgfsUtil.h
open-vm-tools/modules/freebsd/vmhgfs/hgfs_kernel.h
open-vm-tools/modules/freebsd/vmhgfs/os.c
open-vm-tools/modules/freebsd/vmhgfs/os.h
open-vm-tools/modules/freebsd/vmhgfs/state.c
open-vm-tools/modules/freebsd/vmhgfs/vfsops.c
open-vm-tools/modules/freebsd/vmhgfs/vm_basic_asm_x86.h
open-vm-tools/modules/freebsd/vmhgfs/vm_basic_asm_x86_64.h
open-vm-tools/modules/freebsd/vmhgfs/vm_basic_defs.h
open-vm-tools/modules/freebsd/vmhgfs/vnops.c
open-vm-tools/modules/freebsd/vmhgfs/x86cpuid.h
open-vm-tools/modules/freebsd/vmmemctl/vm_basic_defs.h
open-vm-tools/modules/freebsd/vmxnet/if_vxn.c
open-vm-tools/modules/freebsd/vmxnet/vmxnet2_def.h
open-vm-tools/modules/freebsd/vmxnet/vmxnet_def.h
open-vm-tools/modules/linux/vmblock/include/vm_basic_defs.h
open-vm-tools/modules/linux/vmblock/linux/os.h
open-vm-tools/modules/linux/vmhgfs/hgfs.h
open-vm-tools/modules/linux/vmhgfs/hgfsBd.c
open-vm-tools/modules/linux/vmhgfs/hgfsBd.h
open-vm-tools/modules/linux/vmhgfs/hgfsProto.h
open-vm-tools/modules/linux/vmhgfs/hgfsUtil.c
open-vm-tools/modules/linux/vmhgfs/hgfsUtil.h
open-vm-tools/modules/linux/vmhgfs/page.c
open-vm-tools/modules/linux/vmhgfs/vm_basic_asm_x86.h
open-vm-tools/modules/linux/vmhgfs/vm_basic_asm_x86_64.h
open-vm-tools/modules/linux/vmhgfs/vm_basic_defs.h
open-vm-tools/modules/linux/vmhgfs/x86cpuid.h
open-vm-tools/modules/linux/vmmemctl/vm_basic_defs.h
open-vm-tools/modules/linux/vmxnet/vmxnet.c
open-vm-tools/modules/linux/vmxnet/vmxnet2_def.h
open-vm-tools/modules/linux/vmxnet/vmxnet_def.h
open-vm-tools/modules/linux/vmxnet/vmxnet_version.h
open-vm-tools/scripts/Makefile.in
open-vm-tools/toolbox/Makefile.am
open-vm-tools/toolbox/Makefile.in
open-vm-tools/toolbox/debugStdio.c
open-vm-tools/toolbox/toolbox-gtk.c
open-vm-tools/toolbox/toolboxScripts.c
open-vm-tools/toolbox/toolboxShrink.c
open-vm-tools/vmware-user-suid-wrapper/Makefile.in
open-vm-tools/vmware-user/Makefile.am
open-vm-tools/vmware-user/Makefile.in
open-vm-tools/vmware-user/copyPaste.c
open-vm-tools/vmware-user/debugStdio.c
open-vm-tools/vmware-user/dnd.c
open-vm-tools/vmware-user/foreignVMToolsNetworking.c
open-vm-tools/vmware-user/foundryToolsDaemon.c
open-vm-tools/vmware-user/vmware-user.c
open-vm-tools/vmware-user/vmwareuserInt.h
open-vm-tools/xferlogs/Makefile.in

index 72be8c2c22119ddc51be354c93b6abb7cf2a3d90..2ab97b151e3f9b15ce5c0bb8831dd966efeb6b93 100755 (executable)
+2008-06-13  Elliot Lee  <elliot@vmware.com>
+
+       * Resync with internal trunk (2008.06.13)
+
+       * FreeBSD 7/8 fixes from Martin Blapp.
+
+       * Fix getpwnam_r etc. on FreeBSD & Solaris.
+
+       * configure.ac: Add --without-kernel-modules,
+       --with-linux-release, and --with-linuxdir (gissa).
+
+       * configure.ac, lib/guestRpc/*, lib/guestInfo/guestInfo.c,
+       lib/guestInfo/guestInfoServer.c, lib/dynxdr/*,
+       {vmware-user,guestd}/foreignVMToolsNetworking.c, guestd/Makefile.am,
+       {vmware-user,guestd}/foundryToolsDaemon.c, lib/include/dynxdr.h,
+       lib/include/guestInfo.h, lib/include/vmxrpc.h,
+       lib/include/xdrutil.h, lib/Makefile.am, lib/netUtil/*,
+       lib/vixTools/Makefile.am: Add support for XDR encoding of RPC
+       values, including the NicInfoV2 structure.
+
+       * guestd/stub.c, hgfsclient/Makefile.am, hgfsclient/stub.c,
+       hgfsclient/stub-user-util.c, hgfsmounter/Makefile.am,
+       hgfsmounter/stub.c, lib/stubs/*, libguestlib/Makefile.am,
+       libguestlib/stubs.c, toolbox/Makefile.am, toolbox/stub.c,
+       vmware-user/stub.c: Centralize stubs.
+
+       * lib/guestInfo/guestInfoPerfMonLinux.c: Convert ioInRate and
+       ioOutRate to be in terms of KB instead of pages.
+
+       * lib/hgfsBd/hgfsBd.c, lib/hgfsServer/hgfsServer.c,
+       lib/hgfsServer/hgfsServerLinux.c: Large packet support, and
+       additional case-insensitivity fixes.
+
+       * lib/include/hgfsBd.h, lib/include/hgfs.h,
+       lib/include/hgfsProto.h: Add HGFS error code.
+       
+       * lib/hgfs/hgfsUtil.c, lib/guestInfo/Makefile.am,
+       lib/guestInfo/guestInfoPosix.c, lib/guestApp/guestApp.c,
+       lib/foundryMsg/foundryMsg.c, lib/file/fileLockPrimitive.c,
+       lib/file/fileIOPosix.c, lib/file/fileLockPosix.c,
+       guestd/toolsDaemon.c, guestd/debugStdio.c, guestd/main.c,
+       lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c,
+       lib/include/codeset.h, lib/include/cpuid_info.h,
+       lib/include/dnd.h, lib/include/file_extensions.h,
+       lib/include/fileInt.h, lib/include/ghIntegration.h,
+       lib/include/guestApp.h, lib/include/guestStats.h,
+       lib/include/hgfsServerInt.h, lib/include/hgfsUtil.h,
+       lib/include/hostinfo.h, lib/include/loglevel_user.h,
+       lib/include/netutil.h, lib/include/panic.h, lib/include/posix.h,
+       lib/include/unicode*.h, lib/include/util.h, lib/include/vix.h,
+       lib/include/vixTools.h, lib/include/vm_app.h,
+       lib/include/vm_basic_defs.h, lib/include/vm_product.h,
+       lib/include/vm_tools_version.h, lib/include/vm_version.h,
+       lib/include/x86cpuid.h, lib/misc/codeset.c, lib/misc/codesetOld.c,
+       lib/misc/codesetOld.h, lib/misc/hashTable.c, lib/misc/hostname.c,
+       lib/misc/timeutil.c, lib/panic/panic.c, lib/string/str.c,
+       lib/sync/syncMutex.c, lib/system/systemLinux.c, lib/unicode/*.c,
+       lib/unityStub/*, lib/user/hostinfo.c, lib/user/hostinfoPosix.c,
+       lib/vixTools/*, modules/linux/vmxnet/*, toolbox/debugStdio.c,
+       vmware-user/debugStdio.c, vmware-user/dnd.c, vmware-user/main.c:
+       Bug fixes.
+
+       * modules/linux/vmxnet/*: Remove unused BPF code. Add ethtool
+       callbacks to get & set driver settings.
+
+       * lib/user/util.c: Add function for getting backtraces.
+
+       * lib/resolution/*, vmware-user/*, lib/Makefile.am, configure.ac:
+       Move resolution-changing code into separate library.
+
+       * guestd/main.c, lib/include/tools.h: Allow disabling tools
+       version reporting to the host, via config file.
+
+       * lib/rpcIn/*, lib/include/rpcin.h, guestd/toolsDaemon.c,
+       toolbox/toolbox-gtk.c: Updated RPC API
+
+       * lib/include/dndGuest.h: Helper API for DnD code
+
+       * modules/freebsd/vmhgfs/*, modules/freebsd/vmmemctl/*,
+       modules/freebsd/vmblock/*, modules/linux/vmhgfs/*,
+       modules/linux/vmmemctl/*: Reflect changes from main source tree.
+
+       * vmware-user/copyPaste.c: Copy/paste cleanup.
+
+       * vmware-user/vmware-user.c: Updated locking code to use X11
+       display instead of lockfiles.
+
 2008-06-03  Adar Dembo  <adar@vmware.com>
        * Resync with internal trunk (2008.05.28).
 
        * configure.ac, Makefile.am, */Makefile.am: Added rudimentary
        `make install` support. Fixes Sourceforge bug 1839981.
-       
+
        * configure.ac, Makefile.am, vmware-user-suid-wrapper/*: Added
        vmware-user-suid-wrapper to help autostart vmware-user. Added some
        informational tags to AC_DEFINE macros.
-       
+
        * */debugStdio.c: Fixed a format string vulnerability
        in Debug. Allocate fd on the stack in DebugToFile.
 
        * lib/include/productState.h: Added VDM client product.
 
        * lib/include/unicode*, lib/unicode/*: Ongoing i18n work.
-       
+
        * lib/include/vixCommands.h: Added command to set snapshot information.
 
        * lib/include/vix.h: Added more errors and a new flag.
        only one vmware-user instance per X session.
 
        * xferlogs/xferlogs.c: Fix a formatted string vulnerability.
-       
+
 2008-05-12  Elliot Lee  <elliot@vmware.com>
 
        * Resync with internal trunk (2008.05.08).
index 9202f4dff8b9d3e5179262df4500e739b520fa50..0a78054073359021037f99f2f181e63ce854c4f6 100644 (file)
-open-vm-tools-2008.06.03-96374:
-total 1692
--rwxr-xr-x  1 mts mts     33 Jun  3 01:05 AUTHORS
--rwxr-xr-x  1 mts mts  26425 Jun  3 01:05 COPYING
--rwxr-xr-x  1 mts mts  44357 Jun  3 01:05 ChangeLog
--r--r--r--  1 mts mts   9416 Jun  3 01:06 INSTALL
--rwxr-xr-x  1 mts mts   1411 Jun  3 01:05 Makefile.am
--rw-r--r--  1 mts mts  21213 Jun  3 01:06 Makefile.in
--rwxr-xr-x  1 mts mts   2913 Jun  3 01:05 NEWS
--rwxr-xr-x  1 mts mts   6311 Jun  3 01:05 README
--rw-r--r--  1 mts mts 262309 Jun  3 01:06 aclocal.m4
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 autom4te.cache
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 checkvm
--r-xr-xr-x  1 mts mts  43668 Nov 28  2007 config.guess
--r-xr-xr-x  1 mts mts  32151 Nov 28  2007 config.sub
--rwxr-xr-x  1 mts mts 912414 Jun  3 01:06 configure
--rwxr-xr-x  1 mts mts  24770 Jun  3 01:06 configure.ac
--r-xr-xr-x  1 mts mts  17574 Jun  3 01:06 depcomp
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 guestd
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 hgfsclient
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 hgfsmounter
--r-xr-xr-x  1 mts mts  13184 Jun  3 01:06 install-sh
-drwxr-xr-x 48 mts mts   4096 Jun  3 01:06 lib
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 libguestlib
--r--r--r--  1 mts mts 198422 Nov 28  2007 ltmain.sh
--r-xr-xr-x  1 mts mts  11135 Jun  3 01:06 missing
-drwxr-xr-x  4 mts mts   4096 Jun  3 01:06 modules
-drwxr-xr-x  6 mts mts   4096 Jun  3 01:06 scripts
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 toolbox
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 vmware-user
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 vmware-user-suid-wrapper
-drwxr-xr-x  2 mts mts   4096 Jun  3 01:06 xferlogs
-
-open-vm-tools-2008.06.03-96374/autom4te.cache:
-total 2316
--rw-r--r-- 1 mts mts 914607 Jun  3 01:06 output.0
--rw-r--r-- 1 mts mts 914037 Jun  3 01:06 output.1
--rw-r--r-- 1 mts mts  10783 Jun  3 01:06 requests
--rw-r--r-- 1 mts mts 440846 Jun  3 01:06 traces.0
--rw-r--r-- 1 mts mts  62025 Jun  3 01:06 traces.1
-
-open-vm-tools-2008.06.03-96374/checkvm:
+open-vm-tools-2008.06.20-100027:
+total 1704
+-rwxr-xr-x  1 mts mts     33 Jun 21 00:01 AUTHORS
+-rwxr-xr-x  1 mts mts  26425 Jun 21 00:01 COPYING
+-rwxr-xr-x  1 mts mts  47992 Jun 21 00:01 ChangeLog
+-r--r--r--  1 mts mts   9416 Jun 21 00:01 INSTALL
+-rwxr-xr-x  1 mts mts   1440 Jun 21 00:01 Makefile.am
+-rw-r--r--  1 mts mts  21257 Jun 21 00:01 Makefile.in
+-rwxr-xr-x  1 mts mts   3631 Jun 21 00:01 NEWS
+-rwxr-xr-x  1 mts mts   6311 Jun 21 00:01 README
+-rw-r--r--  1 mts mts 262309 Jun 21 00:01 aclocal.m4
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 autom4te.cache
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 checkvm
+-r-xr-xr-x  1 mts mts  43668 Dec 13  2007 config.guess
+-r-xr-xr-x  1 mts mts  32151 Dec 13  2007 config.sub
+-rwxr-xr-x  1 mts mts 918670 Jun 21 00:01 configure
+-rwxr-xr-x  1 mts mts  26691 Jun 21 00:01 configure.ac
+-r-xr-xr-x  1 mts mts  17574 Jun 21 00:01 depcomp
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 guestd
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 hgfsclient
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 hgfsmounter
+-r-xr-xr-x  1 mts mts  13184 Jun 21 00:01 install-sh
+drwxr-xr-x 52 mts mts   4096 Jun 21 00:01 lib
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 libguestlib
+-r--r--r--  1 mts mts 198422 Dec 13  2007 ltmain.sh
+-r-xr-xr-x  1 mts mts  11135 Jun 21 00:01 missing
+drwxr-xr-x  4 mts mts   4096 Jun 21 00:01 modules
+drwxr-xr-x  6 mts mts   4096 Jun 21 00:01 scripts
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 toolbox
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 vmware-user
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 vmware-user-suid-wrapper
+drwxr-xr-x  2 mts mts   4096 Jun 21 00:01 xferlogs
+
+open-vm-tools-2008.06.20-100027/autom4te.cache:
+total 2324
+-rw-r--r-- 1 mts mts 920876 Jun 21 00:01 output.0
+-rw-r--r-- 1 mts mts 920306 Jun 21 00:01 output.1
+-rw-r--r-- 1 mts mts  10783 Jun 21 00:01 requests
+-rw-r--r-- 1 mts mts 441320 Jun 21 00:01 traces.0
+-rw-r--r-- 1 mts mts  63091 Jun 21 00:01 traces.1
+
+open-vm-tools-2008.06.20-100027/checkvm:
 total 60
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts   977 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15851 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  7107 Jun  3 01:06 checkvm.c
--r--r--r-- 1 mts mts  1544 Jun  3 01:06 checkvm_version.h
-
-open-vm-tools-2008.06.03-96374/guestd:
-total 336
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  4202 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 21074 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
--r--r--r-- 1 mts mts 37366 Jun  3 01:06 foreignVMToolsDaemon.c
--r--r--r-- 1 mts mts  6210 Jun  3 01:06 foreignVMToolsDaemon.h
--r--r--r-- 1 mts mts 36992 Jun  3 01:06 foreignVMToolsNetworking.c
--r--r--r-- 1 mts mts 54676 Jun  3 01:06 foundryToolsDaemon.c
--r--r--r-- 1 mts mts  1766 Jun  3 01:06 foundryToolsDaemon.h
--r--r--r-- 1 mts mts  1521 Jun  3 01:06 guestd_version.h
--r--r--r-- 1 mts mts 40324 Jun  3 01:06 main.c
--r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
--r--r--r-- 1 mts mts 54521 Jun  3 01:06 toolsDaemon.c
--r--r--r-- 1 mts mts  4049 Jun  3 01:06 toolsDaemon.h
-
-open-vm-tools-2008.06.03-96374/hgfsclient:
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts   977 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15869 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7107 Jun 21 00:01 checkvm.c
+-r--r--r-- 1 mts mts  1544 Jun 21 00:01 checkvm_version.h
+
+open-vm-tools-2008.06.20-100027/guestd:
+total 328
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  4358 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 21225 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  6234 Jun 21 00:01 debugStdio.c
+-r--r--r-- 1 mts mts 37366 Jun 21 00:01 foreignVMToolsDaemon.c
+-r--r--r-- 1 mts mts  6210 Jun 21 00:01 foreignVMToolsDaemon.h
+-r--r--r-- 1 mts mts 36872 Jun 21 00:01 foreignVMToolsNetworking.c
+-r--r--r-- 1 mts mts 54650 Jun 21 00:01 foundryToolsDaemon.c
+-r--r--r-- 1 mts mts  1766 Jun 21 00:01 foundryToolsDaemon.h
+-r--r--r-- 1 mts mts  1521 Jun 21 00:01 guestd_version.h
+-r--r--r-- 1 mts mts 40324 Jun 21 00:01 main.c
+-r--r--r-- 1 mts mts 54695 Jun 21 00:01 toolsDaemon.c
+-r--r--r-- 1 mts mts  4049 Jun 21 00:01 toolsDaemon.h
+
+open-vm-tools-2008.06.20-100027/hgfsclient:
 total 80
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  2312 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 17299 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 16756 Jun  3 01:06 hgfsclient.c
--r--r--r-- 1 mts mts  1576 Jun  3 01:06 hgfsclient_version.h
--r--r--r-- 1 mts mts  2398 Jun  3 01:06 stub.c
-
-open-vm-tools-2008.06.03-96374/hgfsmounter:
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  2373 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 17398 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 16756 Jun 21 00:01 hgfsclient.c
+-r--r--r-- 1 mts mts  1576 Jun 21 00:01 hgfsclient_version.h
+-r--r--r-- 1 mts mts  1350 Jun 21 00:01 stub-user-util.c
+
+open-vm-tools-2008.06.20-100027/hgfsmounter:
 total 92
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1444 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 16733 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 29755 Jun  3 01:06 hgfsmounter.c
--r--r--r-- 1 mts mts  1578 Jun  3 01:06 hgfsmounter_version.h
--r--r--r-- 1 mts mts  2113 Jun  3 01:06 stub.c
-
-open-vm-tools-2008.06.03-96374/lib:
-total 236
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1793 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 16459 Jun  3 01:06 Makefile.in
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 SLPv2Parser
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 auth
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 backdoor
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 conf
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 deployPkg
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 dict
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 dnd
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 err
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 eventManager
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 file
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 foundryMsg
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 ghIntegrationStub
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 guestApp
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 guestInfo
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfs
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsBd
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServer
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServerManagerGuest
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 hgfsServerPolicyGuest
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 impersonate
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 include
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 message
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 misc
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 netUtil
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 panic
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 panicDefault
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 printer
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 procMgr
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 rpcIn
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 rpcOut
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 rpcVmx
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 socketMgr
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 strUtil
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 string
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 sync
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 syncDriver
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 system
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 toolsLogger
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 unicode
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 unityStub
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 user
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vixTools
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmBackupLib
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmCheck
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 vmSignal
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 wiper
-
-open-vm-tools-2008.06.03-96374/lib/SLPv2Parser:
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1606 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 16968 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 29958 Jun 21 00:01 hgfsmounter.c
+-r--r--r-- 1 mts mts  1578 Jun 21 00:01 hgfsmounter_version.h
+-r--r--r-- 1 mts mts  1350 Jun 21 00:01 stub-user-util.c
+
+open-vm-tools-2008.06.20-100027/lib:
+total 252
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1870 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 16513 Jun 21 00:01 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 SLPv2Parser
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 auth
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 backdoor
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 conf
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 deployPkg
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 dict
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 dnd
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 dynxdr
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 err
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 eventManager
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 file
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 foundryMsg
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 ghIntegrationStub
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 guestApp
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 guestInfo
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 guestRpc
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 hgfs
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 hgfsBd
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 hgfsServer
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 hgfsServerManagerGuest
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 hgfsServerPolicyGuest
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 impersonate
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 include
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 message
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 misc
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 netUtil
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 panic
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 panicDefault
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 printer
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 procMgr
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 resolution
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 rpcIn
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 rpcOut
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 rpcVmx
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 socketMgr
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 strUtil
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 string
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 stubs
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 sync
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 syncDriver
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 system
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 toolsLogger
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 unicode
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 unityStub
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 user
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 vixTools
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 vmBackupLib
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 vmCheck
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 vmSignal
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 wiper
+
+open-vm-tools-2008.06.20-100027/lib/SLPv2Parser:
 total 68
--r--r--r-- 1 mts mts  1083 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15054 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  7514 Jun  3 01:06 SLPv2Match.c
--r--r--r-- 1 mts mts 18294 Jun  3 01:06 SLPv2MsgAssembler.c
--r--r--r-- 1 mts mts 16818 Jun  3 01:06 SLPv2MsgParser.c
+-r--r--r-- 1 mts mts  1083 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15072 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7514 Jun 21 00:01 SLPv2Match.c
+-r--r--r-- 1 mts mts 18294 Jun 21 00:01 SLPv2MsgAssembler.c
+-r--r--r-- 1 mts mts 16818 Jun 21 00:01 SLPv2MsgParser.c
 
-open-vm-tools-2008.06.03-96374/lib/auth:
+open-vm-tools-2008.06.20-100027/lib/auth:
 total 32
--r--r--r-- 1 mts mts  1001 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14681 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8634 Jun  3 01:06 authPosix.c
+-r--r--r-- 1 mts mts  1001 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14699 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8634 Jun 21 00:01 authPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/backdoor:
+open-vm-tools-2008.06.20-100027/lib/backdoor:
 total 52
--r--r--r-- 1 mts mts  1135 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 19380 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  6407 Jun  3 01:06 backdoor.c
--r--r--r-- 1 mts mts  6198 Jun  3 01:06 backdoorGcc32.c
--r--r--r-- 1 mts mts  5574 Jun  3 01:06 backdoorGcc64.c
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
-
-open-vm-tools-2008.06.03-96374/lib/backdoor/shared:
+-r--r--r-- 1 mts mts  1135 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 19398 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  6407 Jun 21 00:01 backdoor.c
+-r--r--r-- 1 mts mts  6198 Jun 21 00:01 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5574 Jun 21 00:01 backdoorGcc64.c
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+
+open-vm-tools-2008.06.20-100027/lib/backdoor/shared:
 total 24
--r--r--r-- 1 mts mts  1122 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 18257 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1122 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 18275 Jun 21 00:01 Makefile.in
 
-open-vm-tools-2008.06.03-96374/lib/conf:
+open-vm-tools-2008.06.20-100027/lib/conf:
 total 28
--r--r--r-- 1 mts mts   963 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14634 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  5057 Jun  3 01:06 conf.c
+-r--r--r-- 1 mts mts   963 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14652 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  5057 Jun 21 00:01 conf.c
 
-open-vm-tools-2008.06.03-96374/lib/deployPkg:
+open-vm-tools-2008.06.20-100027/lib/deployPkg:
 total 40
--r--r--r-- 1 mts mts  1070 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15003 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8242 Jun  3 01:06 deployPkg.c
--r--r--r-- 1 mts mts  3246 Jun  3 01:06 deployPkgLog.c
--r--r--r-- 1 mts mts  3605 Jun  3 01:06 runDeployPkgPosix.c
+-r--r--r-- 1 mts mts  1070 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15021 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8242 Jun 21 00:01 deployPkg.c
+-r--r--r-- 1 mts mts  3246 Jun 21 00:01 deployPkgLog.c
+-r--r--r-- 1 mts mts  3605 Jun 21 00:01 runDeployPkgPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/dict:
+open-vm-tools-2008.06.20-100027/lib/dict:
 total 36
--r--r--r-- 1 mts mts   965 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14640 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 15769 Jun  3 01:06 dictll.c
+-r--r--r-- 1 mts mts   965 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14658 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 15769 Jun 21 00:01 dictll.c
 
-open-vm-tools-2008.06.03-96374/lib/dnd:
+open-vm-tools-2008.06.20-100027/lib/dnd:
 total 64
--r--r--r-- 1 mts mts   996 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14730 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 27762 Jun  3 01:06 dndCommon.c
--r--r--r-- 1 mts mts 15044 Jun  3 01:06 dndLinux.c
+-r--r--r-- 1 mts mts   996 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14748 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 27762 Jun 21 00:01 dndCommon.c
+-r--r--r-- 1 mts mts 15044 Jun 21 00:01 dndLinux.c
+
+open-vm-tools-2008.06.20-100027/lib/dynxdr:
+total 36
+-r--r--r-- 1 mts mts  1006 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14799 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8673 Jun 21 00:01 dynxdr.c
+-r--r--r-- 1 mts mts  2084 Jun 21 00:01 xdrutil.c
 
-open-vm-tools-2008.06.03-96374/lib/err:
+open-vm-tools-2008.06.20-100027/lib/err:
 total 36
--r--r--r-- 1 mts mts   990 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14712 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  6614 Jun  3 01:06 err.c
--r--r--r-- 1 mts mts  1172 Jun  3 01:06 errInt.h
--r--r--r-- 1 mts mts  3158 Jun  3 01:06 errPosix.c
+-r--r--r-- 1 mts mts   990 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14730 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  6614 Jun 21 00:01 err.c
+-r--r--r-- 1 mts mts  1172 Jun 21 00:01 errInt.h
+-r--r--r-- 1 mts mts  3158 Jun 21 00:01 errPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/eventManager:
+open-vm-tools-2008.06.20-100027/lib/eventManager:
 total 28
--r--r--r-- 1 mts mts   995 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14826 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  7083 Jun  3 01:06 eventManager.c
-
-open-vm-tools-2008.06.03-96374/lib/file:
-total 288
--r--r--r-- 1 mts mts  1173 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15233 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 50263 Jun  3 01:06 file.c
--r--r--r-- 1 mts mts 13498 Jun  3 01:06 fileIO.c
--r--r--r-- 1 mts mts 49754 Jun  3 01:06 fileIOPosix.c
--r--r--r-- 1 mts mts 26974 Jun  3 01:06 fileLockPosix.c
--r--r--r-- 1 mts mts 42079 Jun  3 01:06 fileLockPrimitive.c
--r--r--r-- 1 mts mts 62176 Jun  3 01:06 filePosix.c
-
-open-vm-tools-2008.06.03-96374/lib/foundryMsg:
+-r--r--r-- 1 mts mts   995 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14844 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7083 Jun 21 00:01 eventManager.c
+
+open-vm-tools-2008.06.20-100027/lib/file:
+total 296
+-r--r--r-- 1 mts mts  1173 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15251 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 50263 Jun 21 00:01 file.c
+-r--r--r-- 1 mts mts 13498 Jun 21 00:01 fileIO.c
+-r--r--r-- 1 mts mts 54711 Jun 21 00:01 fileIOPosix.c
+-r--r--r-- 1 mts mts 27336 Jun 21 00:01 fileLockPosix.c
+-r--r--r-- 1 mts mts 46098 Jun 21 00:01 fileLockPrimitive.c
+-r--r--r-- 1 mts mts 62176 Jun 21 00:01 filePosix.c
+
+open-vm-tools-2008.06.20-100027/lib/foundryMsg:
 total 108
--r--r--r-- 1 mts mts  1141 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15213 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 26222 Jun  3 01:06 foundryMsg.c
--r--r--r-- 1 mts mts 42795 Jun  3 01:06 foundryPropertyListCommon.c
--r--r--r-- 1 mts mts  6845 Jun  3 01:06 foundryThreads.c
--r--r--r-- 1 mts mts  7449 Jun  3 01:06 vixTranslateErrOpenSource.c
-
-open-vm-tools-2008.06.03-96374/lib/ghIntegrationStub:
+-r--r--r-- 1 mts mts  1141 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15231 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 26325 Jun 21 00:01 foundryMsg.c
+-r--r--r-- 1 mts mts 42795 Jun 21 00:01 foundryPropertyListCommon.c
+-r--r--r-- 1 mts mts  6845 Jun 21 00:01 foundryThreads.c
+-r--r--r-- 1 mts mts  7449 Jun 21 00:01 vixTranslateErrOpenSource.c
+
+open-vm-tools-2008.06.20-100027/lib/ghIntegrationStub:
 total 24
--r--r--r-- 1 mts mts  1048 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14978 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  1228 Jun  3 01:06 ghIntegrationStub.c
+-r--r--r-- 1 mts mts  1048 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14996 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  1228 Jun 21 00:01 ghIntegrationStub.c
 
-open-vm-tools-2008.06.03-96374/lib/guestApp:
+open-vm-tools-2008.06.20-100027/lib/guestApp:
 total 72
--r--r--r-- 1 mts mts  1020 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14847 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 42611 Jun  3 01:06 guestApp.c
--r--r--r-- 1 mts mts  5720 Jun  3 01:06 guestAppPosix.c
+-r--r--r-- 1 mts mts  1020 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14865 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 43264 Jun 21 00:01 guestApp.c
+-r--r--r-- 1 mts mts  5720 Jun 21 00:01 guestAppPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/guestInfo:
+open-vm-tools-2008.06.20-100027/lib/guestInfo:
 total 104
--r--r--r-- 1 mts mts  1144 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15087 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  6509 Jun  3 01:06 guestInfoPerfMonLinux.c
--r--r--r-- 1 mts mts 25707 Jun  3 01:06 guestInfoPosix.c
--r--r--r-- 1 mts mts 47930 Jun  3 01:06 guestInfoServer.c
+-r--r--r-- 1 mts mts  1222 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15242 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  4137 Jun 21 00:01 guestInfo.c
+-r--r--r-- 1 mts mts  6537 Jun 21 00:01 guestInfoPerfMonLinux.c
+-r--r--r-- 1 mts mts 25474 Jun 21 00:01 guestInfoPosix.c
+-r--r--r-- 1 mts mts 37187 Jun 21 00:01 guestInfoServer.c
+
+open-vm-tools-2008.06.20-100027/lib/guestRpc:
+total 24
+-r--r--r-- 1 mts mts  1487 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15310 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  1836 Jun 21 00:01 nicinfo.x
 
-open-vm-tools-2008.06.03-96374/lib/hgfs:
+open-vm-tools-2008.06.20-100027/lib/hgfs:
 total 88
--r--r--r-- 1 mts mts  1175 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15318 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 12069 Jun  3 01:06 cpName.c
--r--r--r-- 1 mts mts  5787 Jun  3 01:06 cpNameLinux.c
--r--r--r-- 1 mts mts  2666 Jun  3 01:06 cpNameLite.c
--r--r--r-- 1 mts mts  9115 Jun  3 01:06 cpNameUtil.c
--r--r--r-- 1 mts mts  1477 Jun  3 01:06 cpNameUtilInt.h
--r--r--r-- 1 mts mts  5613 Jun  3 01:06 cpNameUtilLinux.c
--r--r--r-- 1 mts mts  6846 Jun  3 01:06 hgfsUtil.c
--r--r--r-- 1 mts mts  8847 Jun  3 01:06 staticEscape.c
-
-open-vm-tools-2008.06.03-96374/lib/hgfsBd:
+-r--r--r-- 1 mts mts  1175 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15336 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 12069 Jun 21 00:01 cpName.c
+-r--r--r-- 1 mts mts  5787 Jun 21 00:01 cpNameLinux.c
+-r--r--r-- 1 mts mts  2666 Jun 21 00:01 cpNameLite.c
+-r--r--r-- 1 mts mts  9115 Jun 21 00:01 cpNameUtil.c
+-r--r--r-- 1 mts mts  1477 Jun 21 00:01 cpNameUtilInt.h
+-r--r--r-- 1 mts mts  5613 Jun 21 00:01 cpNameUtilLinux.c
+-r--r--r-- 1 mts mts  6995 Jun 21 00:01 hgfsUtil.c
+-r--r--r-- 1 mts mts  8847 Jun 21 00:01 staticEscape.c
+
+open-vm-tools-2008.06.20-100027/lib/hgfsBd:
 total 32
--r--r--r-- 1 mts mts   971 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14682 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8713 Jun  3 01:06 hgfsBd.c
-
-open-vm-tools-2008.06.03-96374/lib/hgfsServer:
-total 328
--r--r--r-- 1 mts mts   1072 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts  14943 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 159325 Jun  3 01:06 hgfsServer.c
--r--r--r-- 1 mts mts 144942 Jun  3 01:06 hgfsServerLinux.c
-
-open-vm-tools-2008.06.03-96374/lib/hgfsServerManagerGuest:
+-r--r--r-- 1 mts mts   971 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14700 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  9844 Jun 21 00:01 hgfsBd.c
+
+open-vm-tools-2008.06.20-100027/lib/hgfsServer:
+total 340
+-r--r--r-- 1 mts mts   1072 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts  14961 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 160919 Jun 21 00:01 hgfsServer.c
+-r--r--r-- 1 mts mts 152645 Jun 21 00:01 hgfsServerLinux.c
+
+open-vm-tools-2008.06.20-100027/lib/hgfsServerManagerGuest:
 total 28
--r--r--r-- 1 mts mts  1035 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15074 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  6635 Jun  3 01:06 hgfsServerManagerGuest.c
+-r--r--r-- 1 mts mts  1035 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15092 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  6641 Jun 21 00:01 hgfsServerManagerGuest.c
 
-open-vm-tools-2008.06.03-96374/lib/hgfsServerPolicyGuest:
+open-vm-tools-2008.06.20-100027/lib/hgfsServerPolicyGuest:
 total 36
--r--r--r-- 1 mts mts  1031 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15050 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 13984 Jun  3 01:06 hgfsServerPolicyGuest.c
+-r--r--r-- 1 mts mts  1031 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15068 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 13984 Jun 21 00:01 hgfsServerPolicyGuest.c
 
-open-vm-tools-2008.06.03-96374/lib/impersonate:
+open-vm-tools-2008.06.20-100027/lib/impersonate:
 total 44
--r--r--r-- 1 mts mts  1078 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14970 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8208 Jun  3 01:06 impersonate.c
--r--r--r-- 1 mts mts 11956 Jun  3 01:06 impersonatePosix.c
-
-open-vm-tools-2008.06.03-96374/lib/include:
-total 1248
--r--r--r-- 1 mts mts  1935 Jun  3 01:06 SLPv2.h
--r--r--r-- 1 mts mts 12728 Jun  3 01:06 SLPv2Private.h
--r--r--r-- 1 mts mts  2232 Jun  3 01:06 auth.h
--r--r--r-- 1 mts mts  1361 Jun  3 01:06 backdoor.h
--r--r--r-- 1 mts mts  1056 Jun  3 01:06 backdoorInt.h
--r--r--r-- 1 mts mts  5907 Jun  3 01:06 backdoor_def.h
--r--r--r-- 1 mts mts  3567 Jun  3 01:06 backdoor_types.h
--r--r--r-- 1 mts mts  1698 Jun  3 01:06 base64.h
--r--r--r-- 1 mts mts  1918 Jun  3 01:06 bsd_output.h
--r--r--r-- 1 mts mts  3312 Jun  3 01:06 bsd_output_int.h
--r--r--r-- 1 mts mts  5975 Jun  3 01:06 bsdfmt.h
--r--r--r-- 1 mts mts   272 Jun  3 01:06 buildNumber.h
--r--r--r-- 1 mts mts 10265 Jun  3 01:06 circList.h
--r--r--r-- 1 mts mts 16338 Jun  3 01:06 codeset.h
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 compat
--r--r--r-- 1 mts mts  3889 Jun  3 01:06 conf.h
--r--r--r-- 1 mts mts  4810 Jun  3 01:06 config.h
--r--r--r-- 1 mts mts  4198 Jun  3 01:06 cpName.h
--r--r--r-- 1 mts mts  1822 Jun  3 01:06 cpNameInt.h
--r--r--r-- 1 mts mts  1734 Jun  3 01:06 cpNameLite.h
--r--r--r-- 1 mts mts  2621 Jun  3 01:06 cpNameUtil.h
--r--r--r-- 1 mts mts  3088 Jun  3 01:06 cpuid_info.h
--r--r--r-- 1 mts mts  3428 Jun  3 01:06 cryptoError.h
--r--r--r-- 1 mts mts  2380 Jun  3 01:06 dbllnklst.h
--r--r--r-- 1 mts mts  1304 Jun  3 01:06 debug.h
--r--r--r-- 1 mts mts  1114 Jun  3 01:06 deployPkg.h
--r--r--r-- 1 mts mts  1125 Jun  3 01:06 deployPkgLog.h
--r--r--r-- 1 mts mts  1793 Jun  3 01:06 dictll.h
--r--r--r-- 1 mts mts  7570 Jun  3 01:06 dnd.h
--r--r--r-- 1 mts mts  1819 Jun  3 01:06 dndInt.h
--r--r--r-- 1 mts mts  8051 Jun  3 01:06 dynarray.h
--r--r--r-- 1 mts mts  2632 Jun  3 01:06 dynbuf.h
--r--r--r-- 1 mts mts  1709 Jun  3 01:06 embed_version.h
--r--r--r-- 1 mts mts  2893 Jun  3 01:06 err.h
--r--r--r-- 1 mts mts  3856 Jun  3 01:06 escBitvector.h
--r--r--r-- 1 mts mts  1922 Jun  3 01:06 escape.h
--r--r--r-- 1 mts mts  1539 Jun  3 01:06 eventManager.h
--r--r--r-- 1 mts mts  8800 Jun  3 01:06 file.h
--r--r--r-- 1 mts mts 12660 Jun  3 01:06 fileIO.h
--r--r--r-- 1 mts mts  6081 Jun  3 01:06 fileInt.h
--r--r--r-- 1 mts mts  2408 Jun  3 01:06 fileLock.h
--r--r--r-- 1 mts mts  3460 Jun  3 01:06 file_extensions.h
--r--r--r-- 1 mts mts  2194 Jun  3 01:06 foundryThreads.h
--r--r--r-- 1 mts mts  2271 Jun  3 01:06 ghIntegration.h
--r--r--r-- 1 mts mts  5244 Jun  3 01:06 guestApp.h
--r--r--r-- 1 mts mts  7509 Jun  3 01:06 guestInfo.h
--r--r--r-- 1 mts mts  2009 Jun  3 01:06 guestInfoInt.h
--r--r--r-- 1 mts mts  1415 Jun  3 01:06 guestInfoServer.h
--r--r--r-- 1 mts mts  2949 Jun  3 01:06 guestStats.h
--r--r--r-- 1 mts mts  3030 Jun  3 01:06 guest_msg_def.h
--r--r--r-- 1 mts mts 14575 Jun  3 01:06 guest_os.h
--r--r--r-- 1 mts mts  3237 Jun  3 01:06 hashTable.h
--r--r--r-- 1 mts mts  7032 Jun  3 01:06 hgfs.h
--r--r--r-- 1 mts mts  1474 Jun  3 01:06 hgfsBd.h
--r--r--r-- 1 mts mts  2559 Jun  3 01:06 hgfsDevLinux.h
--r--r--r-- 1 mts mts 39322 Jun  3 01:06 hgfsProto.h
--r--r--r-- 1 mts mts  2072 Jun  3 01:06 hgfsServer.h
--r--r--r-- 1 mts mts 26099 Jun  3 01:06 hgfsServerInt.h
--r--r--r-- 1 mts mts  2212 Jun  3 01:06 hgfsServerManager.h
--r--r--r-- 1 mts mts  3248 Jun  3 01:06 hgfsServerPolicy.h
--r--r--r-- 1 mts mts  3761 Jun  3 01:06 hgfsUtil.h
--r--r--r-- 1 mts mts  1284 Jun  3 01:06 hgfsVirtualDir.h
--r--r--r-- 1 mts mts  1279 Jun  3 01:06 hostType.h
--r--r--r-- 1 mts mts  3463 Jun  3 01:06 hostinfo.h
--r--r--r-- 1 mts mts  1661 Jun  3 01:06 impersonate.h
--r--r--r-- 1 mts mts  2031 Jun  3 01:06 impersonateInt.h
--r--r--r-- 1 mts mts  4286 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts  4636 Jun  3 01:06 iovector.h
--r--r--r-- 1 mts mts  1300 Jun  3 01:06 localconfig.h
--r--r--r-- 1 mts mts  3878 Jun  3 01:06 log.h
--r--r--r-- 1 mts mts  3916 Jun  3 01:06 loglevel_defs.h
--r--r--r-- 1 mts mts  5726 Jun  3 01:06 loglevel_user.h
--r--r--r-- 1 mts mts  3553 Jun  3 01:06 message.h
--r--r--r-- 1 mts mts  1268 Jun  3 01:06 miscSolaris.h
--r--r--r-- 1 mts mts  7510 Jun  3 01:06 mntinfo.h
--r--r--r-- 1 mts mts  8653 Jun  3 01:06 msg.h
--r--r--r-- 1 mts mts  5195 Jun  3 01:06 msgfmt.h
--r--r--r-- 1 mts mts  1751 Jun  3 01:06 netutil.h
--r--r--r-- 1 mts mts  2584 Jun  3 01:06 panic.h
--r--r--r-- 1 mts mts  7488 Jun  3 01:06 posix.h
--r--r--r-- 1 mts mts  2023 Jun  3 01:06 preference.h
--r--r--r-- 1 mts mts  1393 Jun  3 01:06 printer.h
--r--r--r-- 1 mts mts  4812 Jun  3 01:06 procMgr.h
--r--r--r-- 1 mts mts  3198 Jun  3 01:06 productState.h
--r--r--r-- 1 mts mts  1344 Jun  3 01:06 random.h
--r--r--r-- 1 mts mts  1162 Jun  3 01:06 removable_device.h
--r--r--r-- 1 mts mts  2333 Jun  3 01:06 rpcin.h
--r--r--r-- 1 mts mts  1987 Jun  3 01:06 rpcout.h
--r--r--r-- 1 mts mts  2708 Jun  3 01:06 rpcvmx.h
--r--r--r-- 1 mts mts  2148 Jun  3 01:06 runDeployPkgInt.h
--r--r--r-- 1 mts mts  4882 Jun  3 01:06 safetime.h
--r--r--r-- 1 mts mts  3484 Jun  3 01:06 socketMgr.h
--r--r--r-- 1 mts mts  2505 Jun  3 01:06 staticEscape.h
--r--r--r-- 1 mts mts  2373 Jun  3 01:06 stats_file.h
--r--r--r-- 1 mts mts  3432 Jun  3 01:06 stats_user_defs.h
--r--r--r-- 1 mts mts 10763 Jun  3 01:06 stats_user_setup.h
--r--r--r-- 1 mts mts  7072 Jun  3 01:06 str.h
--r--r--r-- 1 mts mts  2142 Jun  3 01:06 strutil.h
--r--r--r-- 1 mts mts  3423 Jun  3 01:06 su.h
--r--r--r-- 1 mts mts  2061 Jun  3 01:06 syncDriver.h
--r--r--r-- 1 mts mts  1564 Jun  3 01:06 syncDriverIoc.h
--r--r--r-- 1 mts mts  2250 Jun  3 01:06 syncEvent.h
--r--r--r-- 1 mts mts  1938 Jun  3 01:06 syncMutex.h
--r--r--r-- 1 mts mts  3372 Jun  3 01:06 syncWaitQ.h
--r--r--r-- 1 mts mts  3152 Jun  3 01:06 system.h
--r--r--r-- 1 mts mts  3240 Jun  3 01:06 timeutil.h
--r--r--r-- 1 mts mts  1751 Jun  3 01:06 toolsDeployPkg.h
--r--r--r-- 1 mts mts  2390 Jun  3 01:06 toolsLogger.h
--r--r--r-- 1 mts mts  1528 Jun  3 01:06 toolsLoggerInt.h
--r--r--r-- 1 mts mts  1578 Jun  3 01:06 unicode.h
--r--r--r-- 1 mts mts 10792 Jun  3 01:06 unicodeBase.h
--r--r--r-- 1 mts mts  2976 Jun  3 01:06 unicodeICU.h
--r--r--r-- 1 mts mts  1911 Jun  3 01:06 unicodeInt.h
--r--r--r-- 1 mts mts 21686 Jun  3 01:06 unicodeOperations.h
--r--r--r-- 1 mts mts  1853 Jun  3 01:06 unicodeTransforms.h
--r--r--r-- 1 mts mts 15446 Jun  3 01:06 unicodeTypes.h
--r--r--r-- 1 mts mts  2465 Jun  3 01:06 unity.h
--r--r--r-- 1 mts mts 16705 Jun  3 01:06 util.h
--r--r--r-- 1 mts mts  2994 Jun  3 01:06 util_shared.h
--r--r--r-- 1 mts mts  1999 Jun  3 01:06 uuid.h
--r--r--r-- 1 mts mts 39071 Jun  3 01:06 vix.h
--r--r--r-- 1 mts mts 62376 Jun  3 01:06 vixCommands.h
--r--r--r-- 1 mts mts 15266 Jun  3 01:06 vixOpenSource.h
--r--r--r-- 1 mts mts  4132 Jun  3 01:06 vixTools.h
--r--r--r-- 1 mts mts  6676 Jun  3 01:06 vmBackup.h
--r--r--r-- 1 mts mts 14163 Jun  3 01:06 vmGuestLib.h
--r--r--r-- 1 mts mts  1092 Jun  3 01:06 vmSessionId.h
--r--r--r-- 1 mts mts  4139 Jun  3 01:06 vm_app.h
--r--r--r-- 1 mts mts  9976 Jun  3 01:06 vm_assert.h
--r--r--r-- 1 mts mts 54313 Jun  3 01:06 vm_atomic.h
--r--r--r-- 1 mts mts 17721 Jun  3 01:06 vm_basic_asm.h
--r--r--r-- 1 mts mts 16137 Jun  3 01:06 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8968 Jun  3 01:06 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12632 Jun  3 01:06 vm_basic_defs.h
--r--r--r-- 1 mts mts 21770 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts  2430 Jun  3 01:06 vm_ctype.h
--r--r--r-- 1 mts mts  2118 Jun  3 01:06 vm_legal.h
--r--r--r-- 1 mts mts 19398 Jun  3 01:06 vm_product.h
--r--r--r-- 1 mts mts 30135 Jun  3 01:06 vm_tools_version.h
--r--r--r-- 1 mts mts 16339 Jun  3 01:06 vm_version.h
--r--r--r-- 1 mts mts  3582 Jun  3 01:06 vmbackup_def.h
--r--r--r-- 1 mts mts  4356 Jun  3 01:06 vmblock.h
--r--r--r-- 1 mts mts  1275 Jun  3 01:06 vmcheck.h
--r--r--r-- 1 mts mts  1270 Jun  3 01:06 vmsignal.h
--r--r--r-- 1 mts mts  1336 Jun  3 01:06 vmstdio.h
--r--r--r-- 1 mts mts  1913 Jun  3 01:06 vmware.h
--r--r--r-- 1 mts mts  1340 Jun  3 01:06 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1360 Jun  3 01:06 vmware_pack_end.h
--r--r--r-- 1 mts mts  1980 Jun  3 01:06 vmware_pack_init.h
--r--r--r-- 1 mts mts  7863 Jun  3 01:06 win32util.h
--r--r--r-- 1 mts mts  2751 Jun  3 01:06 wiper.h
--r--r--r-- 1 mts mts 37971 Jun  3 01:06 x86cpuid.h
-
-open-vm-tools-2008.06.03-96374/lib/include/compat:
+-r--r--r-- 1 mts mts  1078 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14988 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8208 Jun 21 00:01 impersonate.c
+-r--r--r-- 1 mts mts 11965 Jun 21 00:01 impersonatePosix.c
+
+open-vm-tools-2008.06.20-100027/lib/include:
+total 1288
+-r--r--r-- 1 mts mts  1935 Jun 21 00:01 SLPv2.h
+-r--r--r-- 1 mts mts 12728 Jun 21 00:01 SLPv2Private.h
+-r--r--r-- 1 mts mts  2232 Jun 21 00:01 auth.h
+-r--r--r-- 1 mts mts  1361 Jun 21 00:01 backdoor.h
+-r--r--r-- 1 mts mts  1056 Jun 21 00:01 backdoorInt.h
+-r--r--r-- 1 mts mts  5907 Jun 21 00:01 backdoor_def.h
+-r--r--r-- 1 mts mts  3567 Jun 21 00:01 backdoor_types.h
+-r--r--r-- 1 mts mts  1698 Jun 21 00:01 base64.h
+-r--r--r-- 1 mts mts  1918 Jun 21 00:01 bsd_output.h
+-r--r--r-- 1 mts mts  3312 Jun 21 00:01 bsd_output_int.h
+-r--r--r-- 1 mts mts  5975 Jun 21 00:01 bsdfmt.h
+-r--r--r-- 1 mts mts   275 Jun 21 00:01 buildNumber.h
+-r--r--r-- 1 mts mts 10265 Jun 21 00:01 circList.h
+-r--r--r-- 1 mts mts 16665 Jun 21 00:01 codeset.h
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 compat
+-r--r--r-- 1 mts mts  4080 Jun 21 00:01 conf.h
+-r--r--r-- 1 mts mts  4810 Jun 21 00:01 config.h
+-r--r--r-- 1 mts mts  4198 Jun 21 00:01 cpName.h
+-r--r--r-- 1 mts mts  1822 Jun 21 00:01 cpNameInt.h
+-r--r--r-- 1 mts mts  1734 Jun 21 00:01 cpNameLite.h
+-r--r--r-- 1 mts mts  2621 Jun 21 00:01 cpNameUtil.h
+-r--r--r-- 1 mts mts  3106 Jun 21 00:01 cpuid_info.h
+-r--r--r-- 1 mts mts  3428 Jun 21 00:01 cryptoError.h
+-r--r--r-- 1 mts mts  2380 Jun 21 00:01 dbllnklst.h
+-r--r--r-- 1 mts mts  1304 Jun 21 00:01 debug.h
+-r--r--r-- 1 mts mts  1114 Jun 21 00:01 deployPkg.h
+-r--r--r-- 1 mts mts  1125 Jun 21 00:01 deployPkgLog.h
+-r--r--r-- 1 mts mts  1793 Jun 21 00:01 dictll.h
+-r--r--r-- 1 mts mts  7587 Jun 21 00:01 dnd.h
+-r--r--r-- 1 mts mts  1131 Jun 21 00:01 dndGuest.h
+-r--r--r-- 1 mts mts  1819 Jun 21 00:01 dndInt.h
+-r--r--r-- 1 mts mts  8051 Jun 21 00:01 dynarray.h
+-r--r--r-- 1 mts mts  2632 Jun 21 00:01 dynbuf.h
+-r--r--r-- 1 mts mts  1756 Jun 21 00:01 dynxdr.h
+-r--r--r-- 1 mts mts  1709 Jun 21 00:01 embed_version.h
+-r--r--r-- 1 mts mts  2893 Jun 21 00:01 err.h
+-r--r--r-- 1 mts mts  3856 Jun 21 00:01 escBitvector.h
+-r--r--r-- 1 mts mts  1922 Jun 21 00:01 escape.h
+-r--r--r-- 1 mts mts  1539 Jun 21 00:01 eventManager.h
+-r--r--r-- 1 mts mts  8800 Jun 21 00:01 file.h
+-r--r--r-- 1 mts mts 12660 Jun 21 00:01 fileIO.h
+-r--r--r-- 1 mts mts  5842 Jun 21 00:01 fileInt.h
+-r--r--r-- 1 mts mts  2408 Jun 21 00:01 fileLock.h
+-r--r--r-- 1 mts mts  3578 Jun 21 00:01 file_extensions.h
+-r--r--r-- 1 mts mts  2194 Jun 21 00:01 foundryThreads.h
+-r--r--r-- 1 mts mts  2320 Jun 21 00:01 ghIntegration.h
+-r--r--r-- 1 mts mts  5286 Jun 21 00:01 guestApp.h
+-r--r--r-- 1 mts mts  3019 Jun 21 00:01 guestInfo.h
+-r--r--r-- 1 mts mts  1894 Jun 21 00:01 guestInfoInt.h
+-r--r--r-- 1 mts mts  1415 Jun 21 00:01 guestInfoServer.h
+-r--r--r-- 1 mts mts  2938 Jun 21 00:01 guestStats.h
+-r--r--r-- 1 mts mts  3030 Jun 21 00:01 guest_msg_def.h
+-r--r--r-- 1 mts mts 14575 Jun 21 00:01 guest_os.h
+-r--r--r-- 1 mts mts  3237 Jun 21 00:01 hashTable.h
+-r--r--r-- 1 mts mts  7841 Jun 21 00:01 hgfs.h
+-r--r--r-- 1 mts mts  1507 Jun 21 00:01 hgfsBd.h
+-r--r--r-- 1 mts mts  2559 Jun 21 00:01 hgfsDevLinux.h
+-r--r--r-- 1 mts mts 39505 Jun 21 00:01 hgfsProto.h
+-r--r--r-- 1 mts mts  2072 Jun 21 00:01 hgfsServer.h
+-r--r--r-- 1 mts mts 26703 Jun 21 00:01 hgfsServerInt.h
+-r--r--r-- 1 mts mts  2212 Jun 21 00:01 hgfsServerManager.h
+-r--r--r-- 1 mts mts  3248 Jun 21 00:01 hgfsServerPolicy.h
+-r--r--r-- 1 mts mts  4176 Jun 21 00:01 hgfsUtil.h
+-r--r--r-- 1 mts mts  1284 Jun 21 00:01 hgfsVirtualDir.h
+-r--r--r-- 1 mts mts  1279 Jun 21 00:01 hostType.h
+-r--r--r-- 1 mts mts  3463 Jun 21 00:01 hostinfo.h
+-r--r--r-- 1 mts mts  1661 Jun 21 00:01 impersonate.h
+-r--r--r-- 1 mts mts  2031 Jun 21 00:01 impersonateInt.h
+-r--r--r-- 1 mts mts  4286 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  4636 Jun 21 00:01 iovector.h
+-r--r--r-- 1 mts mts  1300 Jun 21 00:01 localconfig.h
+-r--r--r-- 1 mts mts  3878 Jun 21 00:01 log.h
+-r--r--r-- 1 mts mts  3916 Jun 21 00:01 loglevel_defs.h
+-r--r--r-- 1 mts mts  5791 Jun 21 00:01 loglevel_user.h
+-r--r--r-- 1 mts mts  3553 Jun 21 00:01 message.h
+-r--r--r-- 1 mts mts  1268 Jun 21 00:01 miscSolaris.h
+-r--r--r-- 1 mts mts  7510 Jun 21 00:01 mntinfo.h
+-r--r--r-- 1 mts mts  8653 Jun 21 00:01 msg.h
+-r--r--r-- 1 mts mts  5195 Jun 21 00:01 msgfmt.h
+-r--r--r-- 1 mts mts  1813 Jun 21 00:01 netutil.h
+-r--r--r-- 1 mts mts  2563 Jun 21 00:01 panic.h
+-r--r--r-- 1 mts mts 17923 Jun 21 00:01 posix.h
+-r--r--r-- 1 mts mts  2023 Jun 21 00:01 preference.h
+-r--r--r-- 1 mts mts  1393 Jun 21 00:01 printer.h
+-r--r--r-- 1 mts mts  4812 Jun 21 00:01 procMgr.h
+-r--r--r-- 1 mts mts  3198 Jun 21 00:01 productState.h
+-r--r--r-- 1 mts mts  1344 Jun 21 00:01 random.h
+-r--r--r-- 1 mts mts  1162 Jun 21 00:01 removable_device.h
+-r--r--r-- 1 mts mts  1985 Jun 21 00:01 resolution.h
+-r--r--r-- 1 mts mts  3322 Jun 21 00:01 rpcin.h
+-r--r--r-- 1 mts mts  1987 Jun 21 00:01 rpcout.h
+-r--r--r-- 1 mts mts  2708 Jun 21 00:01 rpcvmx.h
+-r--r--r-- 1 mts mts  2148 Jun 21 00:01 runDeployPkgInt.h
+-r--r--r-- 1 mts mts  4882 Jun 21 00:01 safetime.h
+-r--r--r-- 1 mts mts  3484 Jun 21 00:01 socketMgr.h
+-r--r--r-- 1 mts mts  2505 Jun 21 00:01 staticEscape.h
+-r--r--r-- 1 mts mts  2373 Jun 21 00:01 stats_file.h
+-r--r--r-- 1 mts mts  3432 Jun 21 00:01 stats_user_defs.h
+-r--r--r-- 1 mts mts 10763 Jun 21 00:01 stats_user_setup.h
+-r--r--r-- 1 mts mts  7072 Jun 21 00:01 str.h
+-r--r--r-- 1 mts mts  2142 Jun 21 00:01 strutil.h
+-r--r--r-- 1 mts mts  3423 Jun 21 00:01 su.h
+-r--r--r-- 1 mts mts  2061 Jun 21 00:01 syncDriver.h
+-r--r--r-- 1 mts mts  1564 Jun 21 00:01 syncDriverIoc.h
+-r--r--r-- 1 mts mts  2250 Jun 21 00:01 syncEvent.h
+-r--r--r-- 1 mts mts  1938 Jun 21 00:01 syncMutex.h
+-r--r--r-- 1 mts mts  3372 Jun 21 00:01 syncWaitQ.h
+-r--r--r-- 1 mts mts  3152 Jun 21 00:01 system.h
+-r--r--r-- 1 mts mts  3240 Jun 21 00:01 timeutil.h
+-r--r--r-- 1 mts mts  1751 Jun 21 00:01 toolsDeployPkg.h
+-r--r--r-- 1 mts mts  2390 Jun 21 00:01 toolsLogger.h
+-r--r--r-- 1 mts mts  1528 Jun 21 00:01 toolsLoggerInt.h
+-r--r--r-- 1 mts mts  1578 Jun 21 00:01 unicode.h
+-r--r--r-- 1 mts mts 10988 Jun 21 00:01 unicodeBase.h
+-r--r--r-- 1 mts mts  2976 Jun 21 00:01 unicodeICU.h
+-r--r--r-- 1 mts mts  1932 Jun 21 00:01 unicodeInt.h
+-r--r--r-- 1 mts mts 22245 Jun 21 00:01 unicodeOperations.h
+-r--r--r-- 1 mts mts  1853 Jun 21 00:01 unicodeTransforms.h
+-r--r--r-- 1 mts mts 15550 Jun 21 00:01 unicodeTypes.h
+-r--r--r-- 1 mts mts  2492 Jun 21 00:01 unity.h
+-r--r--r-- 1 mts mts 16788 Jun 21 00:01 util.h
+-r--r--r-- 1 mts mts  2994 Jun 21 00:01 util_shared.h
+-r--r--r-- 1 mts mts  1999 Jun 21 00:01 uuid.h
+-r--r--r-- 1 mts mts 39175 Jun 21 00:01 vix.h
+-r--r--r-- 1 mts mts 62376 Jun 21 00:01 vixCommands.h
+-r--r--r-- 1 mts mts 15266 Jun 21 00:01 vixOpenSource.h
+-r--r--r-- 1 mts mts  3995 Jun 21 00:01 vixTools.h
+-r--r--r-- 1 mts mts  6676 Jun 21 00:01 vmBackup.h
+-r--r--r-- 1 mts mts 14163 Jun 21 00:01 vmGuestLib.h
+-r--r--r-- 1 mts mts  1092 Jun 21 00:01 vmSessionId.h
+-r--r--r-- 1 mts mts  4098 Jun 21 00:01 vm_app.h
+-r--r--r-- 1 mts mts  9976 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 54313 Jun 21 00:01 vm_atomic.h
+-r--r--r-- 1 mts mts 17721 Jun 21 00:01 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16389 Jun 21 00:01 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  9000 Jun 21 00:01 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 13323 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21770 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  2430 Jun 21 00:01 vm_ctype.h
+-r--r--r-- 1 mts mts  2118 Jun 21 00:01 vm_legal.h
+-r--r--r-- 1 mts mts 19620 Jun 21 00:01 vm_product.h
+-r--r--r-- 1 mts mts 30633 Jun 21 00:01 vm_tools_version.h
+-r--r--r-- 1 mts mts 16337 Jun 21 00:01 vm_version.h
+-r--r--r-- 1 mts mts  3582 Jun 21 00:01 vmbackup_def.h
+-r--r--r-- 1 mts mts  4356 Jun 21 00:01 vmblock.h
+-r--r--r-- 1 mts mts  1275 Jun 21 00:01 vmcheck.h
+-r--r--r-- 1 mts mts  1270 Jun 21 00:01 vmsignal.h
+-r--r--r-- 1 mts mts  1336 Jun 21 00:01 vmstdio.h
+-r--r--r-- 1 mts mts  1913 Jun 21 00:01 vmware.h
+-r--r--r-- 1 mts mts  1340 Jun 21 00:01 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1360 Jun 21 00:01 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1980 Jun 21 00:01 vmware_pack_init.h
+-r--r--r-- 1 mts mts  5806 Jun 21 00:01 vmxrpc.h
+-r--r--r-- 1 mts mts  7863 Jun 21 00:01 win32util.h
+-r--r--r-- 1 mts mts  2834 Jun 21 00:01 wiper.h
+-r--r--r-- 1 mts mts 39516 Jun 21 00:01 x86cpuid.h
+-r--r--r-- 1 mts mts  2168 Jun 21 00:01 xdrutil.h
+
+open-vm-tools-2008.06.20-100027/lib/include/compat:
 total 4
--r--r--r-- 1 mts mts 1906 Jun  3 01:06 compat_stdarg.h
+-r--r--r-- 1 mts mts 1906 Jun 21 00:01 compat_stdarg.h
 
-open-vm-tools-2008.06.03-96374/lib/message:
+open-vm-tools-2008.06.20-100027/lib/message:
 total 68
--r--r--r-- 1 mts mts  1084 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 18943 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8278 Jun  3 01:06 message.c
--r--r--r-- 1 mts mts 17289 Jun  3 01:06 messageBackdoor.c
--r--r--r-- 1 mts mts  4751 Jun  3 01:06 messageStub.c
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
-
-open-vm-tools-2008.06.03-96374/lib/message/shared:
+-r--r--r-- 1 mts mts  1084 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 18961 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8278 Jun 21 00:01 message.c
+-r--r--r-- 1 mts mts 17289 Jun 21 00:01 messageBackdoor.c
+-r--r--r-- 1 mts mts  4751 Jun 21 00:01 messageStub.c
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+
+open-vm-tools-2008.06.20-100027/lib/message/shared:
 total 24
--r--r--r-- 1 mts mts  1071 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 17875 Jun  3 01:06 Makefile.in
-
-open-vm-tools-2008.06.03-96374/lib/misc:
-total 456
--r--r--r-- 1 mts mts  1692 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 21146 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  2146 Jun  3 01:06 atomic.c
--r--r--r-- 1 mts mts 15371 Jun  3 01:06 base64.c
--r--r--r-- 1 mts mts 35741 Jun  3 01:06 codeset.c
--r--r--r-- 1 mts mts 55532 Jun  3 01:06 codesetOld.c
--r--r--r-- 1 mts mts  6339 Jun  3 01:06 codesetOld.h
--r--r--r-- 1 mts mts  8247 Jun  3 01:06 dbllnklst.c
--r--r--r-- 1 mts mts  6500 Jun  3 01:06 dynarray.c
--r--r--r-- 1 mts mts  9876 Jun  3 01:06 dynbuf.c
--r--r--r-- 1 mts mts 14569 Jun  3 01:06 escape.c
--r--r--r-- 1 mts mts 21257 Jun  3 01:06 hashTable.c
--r--r--r-- 1 mts mts  5943 Jun  3 01:06 hostinfo_misc.c
--r--r--r-- 1 mts mts  6141 Jun  3 01:06 hostname.c
--r--r--r-- 1 mts mts 22612 Jun  3 01:06 idLinux.c
--r--r--r-- 1 mts mts 24760 Jun  3 01:06 iovector.c
--r--r--r-- 1 mts mts 14910 Jun  3 01:06 machineID.c
--r--r--r-- 1 mts mts  2017 Jun  3 01:06 miscSolaris.c
--r--r--r-- 1 mts mts  1710 Jun  3 01:06 posixDlopen.c
--r--r--r-- 1 mts mts  5776 Jun  3 01:06 posixInt.h
--r--r--r-- 1 mts mts 49669 Jun  3 01:06 posixPosix.c
--r--r--r-- 1 mts mts 14794 Jun  3 01:06 posixWin32.c
--r--r--r-- 1 mts mts  5943 Jun  3 01:06 random.c
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
--r--r--r-- 1 mts mts 25948 Jun  3 01:06 timeutil.c
--r--r--r-- 1 mts mts 11943 Jun  3 01:06 util_misc.c
--r--r--r-- 1 mts mts  7584 Jun  3 01:06 vmstdio.c
-
-open-vm-tools-2008.06.03-96374/lib/misc/shared:
+-r--r--r-- 1 mts mts  1071 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 17893 Jun 21 00:01 Makefile.in
+
+open-vm-tools-2008.06.20-100027/lib/misc:
+total 468
+-r--r--r-- 1 mts mts  1692 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 21164 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  2146 Jun 21 00:01 atomic.c
+-r--r--r-- 1 mts mts 15371 Jun 21 00:01 base64.c
+-r--r--r-- 1 mts mts 35664 Jun 21 00:01 codeset.c
+-r--r--r-- 1 mts mts 58348 Jun 21 00:01 codesetOld.c
+-r--r--r-- 1 mts mts  7107 Jun 21 00:01 codesetOld.h
+-r--r--r-- 1 mts mts  8247 Jun 21 00:01 dbllnklst.c
+-r--r--r-- 1 mts mts  6500 Jun 21 00:01 dynarray.c
+-r--r--r-- 1 mts mts  9876 Jun 21 00:01 dynbuf.c
+-r--r--r-- 1 mts mts 14569 Jun 21 00:01 escape.c
+-r--r--r-- 1 mts mts 21270 Jun 21 00:01 hashTable.c
+-r--r--r-- 1 mts mts  5943 Jun 21 00:01 hostinfo_misc.c
+-r--r--r-- 1 mts mts  6139 Jun 21 00:01 hostname.c
+-r--r--r-- 1 mts mts 22612 Jun 21 00:01 idLinux.c
+-r--r--r-- 1 mts mts 24760 Jun 21 00:01 iovector.c
+-r--r--r-- 1 mts mts 14910 Jun 21 00:01 machineID.c
+-r--r--r-- 1 mts mts  2017 Jun 21 00:01 miscSolaris.c
+-r--r--r-- 1 mts mts  1710 Jun 21 00:01 posixDlopen.c
+-r--r--r-- 1 mts mts  5776 Jun 21 00:01 posixInt.h
+-r--r--r-- 1 mts mts 59573 Jun 21 00:01 posixPosix.c
+-r--r--r-- 1 mts mts 14794 Jun 21 00:01 posixWin32.c
+-r--r--r-- 1 mts mts  5943 Jun 21 00:01 random.c
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+-r--r--r-- 1 mts mts 26082 Jun 21 00:01 timeutil.c
+-r--r--r-- 1 mts mts 11943 Jun 21 00:01 util_misc.c
+-r--r--r-- 1 mts mts  7584 Jun 21 00:01 vmstdio.c
+
+open-vm-tools-2008.06.20-100027/lib/misc/shared:
 total 40
--r--r--r-- 1 mts mts  1674 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 33842 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1674 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 33860 Jun 21 00:01 Makefile.in
 
-open-vm-tools-2008.06.03-96374/lib/netUtil:
+open-vm-tools-2008.06.20-100027/lib/netUtil:
 total 28
--r--r--r-- 1 mts mts   980 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14721 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  7417 Jun  3 01:06 netUtilLinux.c
+-r--r--r-- 1 mts mts  1019 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14777 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7129 Jun 21 00:01 netUtilLinux.c
 
-open-vm-tools-2008.06.03-96374/lib/panic:
+open-vm-tools-2008.06.20-100027/lib/panic:
 total 36
--r--r--r-- 1 mts mts   967 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14658 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 12986 Jun  3 01:06 panic.c
+-r--r--r-- 1 mts mts   967 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14676 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 12690 Jun 21 00:01 panic.c
 
-open-vm-tools-2008.06.03-96374/lib/panicDefault:
+open-vm-tools-2008.06.20-100027/lib/panicDefault:
 total 24
--r--r--r-- 1 mts mts   988 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14805 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  1488 Jun  3 01:06 panic.c
+-r--r--r-- 1 mts mts   988 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14823 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  1488 Jun 21 00:01 panic.c
 
-open-vm-tools-2008.06.03-96374/lib/printer:
+open-vm-tools-2008.06.20-100027/lib/printer:
 total 32
--r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  9721 Jun  3 01:06 printer.c
+-r--r--r-- 1 mts mts   975 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14724 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  9721 Jun 21 00:01 printer.c
 
-open-vm-tools-2008.06.03-96374/lib/procMgr:
+open-vm-tools-2008.06.20-100027/lib/procMgr:
 total 56
--r--r--r-- 1 mts mts  1017 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14757 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 36619 Jun  3 01:06 procMgrPosix.c
+-r--r--r-- 1 mts mts  1017 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14775 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 36619 Jun 21 00:01 procMgrPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/rpcIn:
+open-vm-tools-2008.06.20-100027/lib/resolution:
+total 72
+-r--r--r-- 1 mts mts  1150 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15079 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7478 Jun 21 00:01 libvmwarectrl.c
+-r--r--r-- 1 mts mts  2031 Jun 21 00:01 libvmwarectrl.h
+-r--r--r-- 1 mts mts 10484 Jun 21 00:01 resolution.c
+-r--r--r-- 1 mts mts  2030 Jun 21 00:01 resolutionInt.h
+-r--r--r-- 1 mts mts 12502 Jun 21 00:01 resolutionX11.c
+-r--r--r-- 1 mts mts  1868 Jun 21 00:01 vmwarectrl.h
+-r--r--r-- 1 mts mts  3636 Jun 21 00:01 vmwarectrlproto.h
+
+open-vm-tools-2008.06.20-100027/lib/rpcIn:
 total 40
--r--r--r-- 1 mts mts   967 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14658 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 17356 Jun  3 01:06 rpcin.c
+-r--r--r-- 1 mts mts   967 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14676 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 19194 Jun 21 00:01 rpcin.c
 
-open-vm-tools-2008.06.03-96374/lib/rpcOut:
+open-vm-tools-2008.06.20-100027/lib/rpcOut:
 total 40
--r--r--r-- 1 mts mts  1000 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 18682 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 11999 Jun  3 01:06 rpcout.c
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
+-r--r--r-- 1 mts mts  1000 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 18700 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 11999 Jun 21 00:01 rpcout.c
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
 
-open-vm-tools-2008.06.03-96374/lib/rpcOut/shared:
+open-vm-tools-2008.06.20-100027/lib/rpcOut/shared:
 total 20
--r--r--r-- 1 mts mts   979 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15704 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts   979 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15722 Jun 21 00:01 Makefile.in
 
-open-vm-tools-2008.06.03-96374/lib/rpcVmx:
+open-vm-tools-2008.06.20-100027/lib/rpcVmx:
 total 28
--r--r--r-- 1 mts mts   971 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14682 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  7278 Jun  3 01:06 rpcvmx.c
+-r--r--r-- 1 mts mts   971 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14700 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  7278 Jun 21 00:01 rpcvmx.c
 
-open-vm-tools-2008.06.03-96374/lib/socketMgr:
+open-vm-tools-2008.06.20-100027/lib/socketMgr:
 total 64
--r--r--r-- 1 mts mts   983 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14754 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 41905 Jun  3 01:06 socketMgr.c
+-r--r--r-- 1 mts mts   983 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14772 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 41905 Jun 21 00:01 socketMgr.c
 
-open-vm-tools-2008.06.03-96374/lib/strUtil:
+open-vm-tools-2008.06.20-100027/lib/strUtil:
 total 40
--r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 16861 Jun  3 01:06 strutil.c
+-r--r--r-- 1 mts mts   975 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14724 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 16861 Jun 21 00:01 strutil.c
 
-open-vm-tools-2008.06.03-96374/lib/string:
+open-vm-tools-2008.06.20-100027/lib/string:
 total 212
--r--r--r-- 1 mts mts  1190 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 19190 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8168 Jun  3 01:06 bsd_output_shared.c
--r--r--r-- 1 mts mts 50068 Jun  3 01:06 bsd_vsnprintf.c
--r--r--r-- 1 mts mts 51480 Jun  3 01:06 bsd_vsnwprintf.c
--r--r--r-- 1 mts mts 19245 Jun  3 01:06 convertutf.c
--r--r--r-- 1 mts mts  6119 Jun  3 01:06 convertutf.h
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
--r--r--r-- 1 mts mts 32929 Jun  3 01:06 str.c
-
-open-vm-tools-2008.06.03-96374/lib/string/shared:
+-r--r--r-- 1 mts mts  1190 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 19208 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8168 Jun 21 00:01 bsd_output_shared.c
+-r--r--r-- 1 mts mts 50068 Jun 21 00:01 bsd_vsnprintf.c
+-r--r--r-- 1 mts mts 51480 Jun 21 00:01 bsd_vsnwprintf.c
+-r--r--r-- 1 mts mts 19245 Jun 21 00:01 convertutf.c
+-r--r--r-- 1 mts mts  6119 Jun 21 00:01 convertutf.h
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+-r--r--r-- 1 mts mts 33971 Jun 21 00:01 str.c
+
+open-vm-tools-2008.06.20-100027/lib/string/shared:
+total 24
+-r--r--r-- 1 mts mts  1185 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 20009 Jun 21 00:01 Makefile.in
+
+open-vm-tools-2008.06.20-100027/lib/stubs:
+total 48
+-r--r--r-- 1 mts mts  1151 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 19159 Jun 21 00:01 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+-r--r--r-- 1 mts mts  1753 Jun 21 00:01 stub-config.c
+-r--r--r-- 1 mts mts  1542 Jun 21 00:01 stub-log.c
+-r--r--r-- 1 mts mts  1738 Jun 21 00:01 stub-user-msg.c
+-r--r--r-- 1 mts mts  1276 Jun 21 00:01 stub-user-panic.c
+-r--r--r-- 1 mts mts  1181 Jun 21 00:01 stub-warning.c
+
+open-vm-tools-2008.06.20-100027/lib/stubs/shared:
 total 24
--r--r--r-- 1 mts mts  1185 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 19991 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1146 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 19993 Jun 21 00:01 Makefile.in
 
-open-vm-tools-2008.06.03-96374/lib/sync:
+open-vm-tools-2008.06.20-100027/lib/sync:
 total 60
--r--r--r-- 1 mts mts  1035 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 18769 Jun  3 01:06 Makefile.in
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 shared
--r--r--r-- 1 mts mts  6533 Jun  3 01:06 syncMutex.c
--r--r--r-- 1 mts mts 21469 Jun  3 01:06 syncWaitQPosix.c
+-r--r--r-- 1 mts mts  1035 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 18787 Jun 21 00:01 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 shared
+-r--r--r-- 1 mts mts  6535 Jun 21 00:01 syncMutex.c
+-r--r--r-- 1 mts mts 21469 Jun 21 00:01 syncWaitQPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/sync/shared:
+open-vm-tools-2008.06.20-100027/lib/sync/shared:
 total 24
--r--r--r-- 1 mts mts  1018 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 16806 Jun  3 01:06 Makefile.in
+-r--r--r-- 1 mts mts  1018 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 16824 Jun 21 00:01 Makefile.in
 
-open-vm-tools-2008.06.03-96374/lib/syncDriver:
+open-vm-tools-2008.06.20-100027/lib/syncDriver:
 total 32
--r--r--r-- 1 mts mts   992 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14793 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  8740 Jun  3 01:06 syncDriverPosix.c
+-r--r--r-- 1 mts mts   992 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14811 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  8740 Jun 21 00:01 syncDriverPosix.c
 
-open-vm-tools-2008.06.03-96374/lib/system:
+open-vm-tools-2008.06.20-100027/lib/system:
 total 32
--r--r--r-- 1 mts mts   953 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14697 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  9382 Jun  3 01:06 systemLinux.c
+-r--r--r-- 1 mts mts   953 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14715 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  9405 Jun 21 00:01 systemLinux.c
 
-open-vm-tools-2008.06.03-96374/lib/toolsLogger:
+open-vm-tools-2008.06.20-100027/lib/toolsLogger:
 total 36
--r--r--r-- 1 mts mts   986 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14787 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 15172 Jun  3 01:06 logger.c
-
-open-vm-tools-2008.06.03-96374/lib/unicode:
-total 232
--r--r--r-- 1 mts mts  1315 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15980 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 11904 Jun  3 01:06 unicodeCommon.c
--r--r--r-- 1 mts mts 13870 Jun  3 01:06 unicodeICU.c
--r--r--r-- 1 mts mts 23894 Jun  3 01:06 unicodeSimpleBase.c
--r--r--r-- 1 mts mts 34559 Jun  3 01:06 unicodeSimpleCaseFolding.c
--r--r--r-- 1 mts mts 15794 Jun  3 01:06 unicodeSimpleOperations.c
--r--r--r-- 1 mts mts 18115 Jun  3 01:06 unicodeSimpleTransforms.c
--r--r--r-- 1 mts mts 77418 Jun  3 01:06 unicodeSimpleTypes.c
--r--r--r-- 1 mts mts  5087 Jun  3 01:06 unicodeStatic.c
-
-open-vm-tools-2008.06.03-96374/lib/unityStub:
+-r--r--r-- 1 mts mts   986 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14805 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 15172 Jun 21 00:01 logger.c
+
+open-vm-tools-2008.06.20-100027/lib/unicode:
+total 236
+-r--r--r-- 1 mts mts  1315 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15998 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 11367 Jun 21 00:01 unicodeCommon.c
+-r--r--r-- 1 mts mts 13870 Jun 21 00:01 unicodeICU.c
+-r--r--r-- 1 mts mts 24466 Jun 21 00:01 unicodeSimpleBase.c
+-r--r--r-- 1 mts mts 34559 Jun 21 00:01 unicodeSimpleCaseFolding.c
+-r--r--r-- 1 mts mts 15794 Jun 21 00:01 unicodeSimpleOperations.c
+-r--r--r-- 1 mts mts 18115 Jun 21 00:01 unicodeSimpleTransforms.c
+-r--r--r-- 1 mts mts 79450 Jun 21 00:01 unicodeSimpleTypes.c
+-r--r--r-- 1 mts mts  5087 Jun 21 00:01 unicodeStatic.c
+
+open-vm-tools-2008.06.20-100027/lib/unityStub:
 total 24
--r--r--r-- 1 mts mts  1016 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14786 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  1637 Jun  3 01:06 unityStub.c
-
-open-vm-tools-2008.06.03-96374/lib/user:
-total 132
--r--r--r-- 1 mts mts  1098 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14993 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  9683 Jun  3 01:06 hostinfo.c
--r--r--r-- 1 mts mts 38636 Jun  3 01:06 hostinfoPosix.c
--r--r--r-- 1 mts mts 39710 Jun  3 01:06 util.c
--r--r--r-- 1 mts mts 18792 Jun  3 01:06 utilPosix.c
-
-open-vm-tools-2008.06.03-96374/lib/vixTools:
+-r--r--r-- 1 mts mts  1044 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14819 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  1642 Jun 21 00:01 unityStub.c
+
+open-vm-tools-2008.06.20-100027/lib/user:
+total 136
+-r--r--r-- 1 mts mts  1098 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15011 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  9735 Jun 21 00:01 hostinfo.c
+-r--r--r-- 1 mts mts 37712 Jun 21 00:01 hostinfoPosix.c
+-r--r--r-- 1 mts mts 44811 Jun 21 00:01 util.c
+-r--r--r-- 1 mts mts 18792 Jun 21 00:01 utilPosix.c
+
+open-vm-tools-2008.06.20-100027/lib/vixTools:
 total 136
--r--r--r-- 1 mts mts    979 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts  14730 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 112594 Jun  3 01:06 vixTools.c
+-r--r--r-- 1 mts mts   1018 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts  14786 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 111356 Jun 21 00:01 vixTools.c
 
-open-vm-tools-2008.06.03-96374/lib/vmBackupLib:
+open-vm-tools-2008.06.20-100027/lib/vmBackupLib:
 total 72
--r--r--r-- 1 mts mts  1076 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15030 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 12762 Jun  3 01:06 scriptOps.c
--r--r--r-- 1 mts mts 20320 Jun  3 01:06 stateMachine.c
--r--r--r-- 1 mts mts  9036 Jun  3 01:06 syncDriverOps.c
--r--r--r-- 1 mts mts  1264 Jun  3 01:06 vmBackupInt.h
-
-open-vm-tools-2008.06.03-96374/lib/vmCheck:
+-r--r--r-- 1 mts mts  1076 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15048 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 12762 Jun 21 00:01 scriptOps.c
+-r--r--r-- 1 mts mts 20320 Jun 21 00:01 stateMachine.c
+-r--r--r-- 1 mts mts  9036 Jun 21 00:01 syncDriverOps.c
+-r--r--r-- 1 mts mts  1264 Jun 21 00:01 vmBackupInt.h
+
+open-vm-tools-2008.06.20-100027/lib/vmCheck:
 total 28
--r--r--r-- 1 mts mts   975 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14706 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  5337 Jun  3 01:06 vmcheck.c
+-r--r--r-- 1 mts mts   975 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14724 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  5337 Jun 21 00:01 vmcheck.c
 
-open-vm-tools-2008.06.03-96374/lib/vmSignal:
+open-vm-tools-2008.06.20-100027/lib/vmSignal:
 total 24
--r--r--r-- 1 mts mts   979 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14730 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  3080 Jun  3 01:06 vmsignal.c
+-r--r--r-- 1 mts mts   979 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14748 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  3080 Jun 21 00:01 vmsignal.c
 
-open-vm-tools-2008.06.03-96374/lib/wiper:
+open-vm-tools-2008.06.20-100027/lib/wiper:
 total 44
--r--r--r-- 1 mts mts   972 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 14673 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 24462 Jun  3 01:06 wiperPosix.c
-
-open-vm-tools-2008.06.03-96374/libguestlib:
-total 100
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1757 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 17243 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  1413 Jun  3 01:06 stubs.c
--r--r--r-- 1 mts mts 26218 Jun  3 01:06 vmGuestLib.c
--r--r--r-- 1 mts mts  4228 Jun  3 01:06 vmGuestLibInt.h
--r--r--r-- 1 mts mts  2436 Jun  3 01:06 vmGuestLibPanic.c
--r--r--r-- 1 mts mts  1547 Jun  3 01:06 vmguestlib_version.h
-
-open-vm-tools-2008.06.03-96374/modules:
+-r--r--r-- 1 mts mts   972 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 14691 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 24462 Jun 21 00:01 wiperPosix.c
+
+open-vm-tools-2008.06.20-100027/libguestlib:
+total 96
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1780 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 17244 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 26218 Jun 21 00:01 vmGuestLib.c
+-r--r--r-- 1 mts mts  4228 Jun 21 00:01 vmGuestLibInt.h
+-r--r--r-- 1 mts mts  2436 Jun 21 00:01 vmGuestLibPanic.c
+-r--r--r-- 1 mts mts  1547 Jun 21 00:01 vmguestlib_version.h
+
+open-vm-tools-2008.06.20-100027/modules:
 total 24
--rwxr-xr-x 1 mts mts  1160 Jun  3 01:05 Makefile.am
--rw-r--r-- 1 mts mts 10993 Jun  3 01:06 Makefile.in
-drwxr-xr-x 6 mts mts  4096 Jun  3 01:06 freebsd
-drwxr-xr-x 7 mts mts  4096 Jun  3 01:06 linux
+-rwxr-xr-x 1 mts mts  1160 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 11011 Jun 21 00:01 Makefile.in
+drwxr-xr-x 6 mts mts  4096 Jun 21 00:01 freebsd
+drwxr-xr-x 7 mts mts  4096 Jun 21 00:01 linux
 
-open-vm-tools-2008.06.03-96374/modules/freebsd:
+open-vm-tools-2008.06.20-100027/modules/freebsd:
 total 16
-drwxr-xr-x 2 mts mts 4096 Jun  3 01:05 vmblock
-drwxr-xr-x 2 mts mts 4096 Jun  3 01:05 vmhgfs
-drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 vmmemctl
-drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 vmxnet
-
-open-vm-tools-2008.06.03-96374/modules/freebsd/vmblock:
-total 220
--r--r--r-- 1 mts mts  1430 Jun  3 01:05 COPYING.BSD
--r--r--r-- 1 mts mts  2151 Jun  3 01:05 Makefile
--r--r--r-- 1 mts mts 17267 Jun  3 01:05 block.c
--r--r--r-- 1 mts mts  2375 Jun  3 01:05 block.h
--r--r--r-- 1 mts mts  9054 Jun  3 01:05 dbllnklst.c
--r--r--r-- 1 mts mts  3187 Jun  3 01:05 dbllnklst.h
--r--r--r-- 1 mts mts     0 Jun  3 01:05 includeCheck.h
--r--r--r-- 1 mts mts  5980 Jun  3 01:05 os.h
--r--r--r-- 1 mts mts  2141 Jun  3 01:05 stubs.c
--r--r--r-- 1 mts mts  1888 Jun  3 01:05 stubs.h
--r--r--r-- 1 mts mts 19458 Jun  3 01:05 subr.c
--r--r--r-- 1 mts mts 13036 Jun  3 01:05 vfsops.c
--r--r--r-- 1 mts mts 10783 Jun  3 01:05 vm_assert.h
--r--r--r-- 1 mts mts 13439 Jun  3 01:05 vm_basic_defs.h
--r--r--r-- 1 mts mts 22577 Jun  3 01:05 vm_basic_types.h
--r--r--r-- 1 mts mts  5163 Jun  3 01:05 vmblock.h
--r--r--r-- 1 mts mts  5872 Jun  3 01:05 vmblock_k.h
--r--r--r-- 1 mts mts  2720 Jun  3 01:05 vmware.h
--r--r--r-- 1 mts mts 45731 Jun  3 01:05 vnops.c
-
-open-vm-tools-2008.06.03-96374/modules/freebsd/vmhgfs:
-total 764
--r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
--r--r--r-- 1 mts mts  2652 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts  6383 Jun  3 01:06 backdoor.c
--r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
--r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
--r--r--r-- 1 mts mts  5883 Jun  3 01:06 backdoor_def.h
--r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
--r--r--r-- 1 mts mts 12045 Jun  3 01:06 cpName.c
--r--r--r-- 1 mts mts  4174 Jun  3 01:06 cpName.h
--r--r--r-- 1 mts mts  1798 Jun  3 01:06 cpNameInt.h
--r--r--r-- 1 mts mts  5763 Jun  3 01:06 cpNameLinux.c
--r--r--r-- 1 mts mts  2642 Jun  3 01:06 cpNameLite.c
--r--r--r-- 1 mts mts  1710 Jun  3 01:06 cpNameLite.h
--r--r--r-- 1 mts mts  8223 Jun  3 01:06 dbllnklst.c
--r--r--r-- 1 mts mts  2356 Jun  3 01:06 dbllnklst.h
--r--r--r-- 1 mts mts  4769 Jun  3 01:06 debug.c
--r--r--r-- 1 mts mts  3358 Jun  3 01:06 debug.h
--r--r--r-- 1 mts mts  3832 Jun  3 01:06 escBitvector.h
--r--r--r-- 1 mts mts 25043 Jun  3 01:06 fsutil.c
--r--r--r-- 1 mts mts  3506 Jun  3 01:06 fsutil.h
--r--r--r-- 1 mts mts  3006 Jun  3 01:06 guest_msg_def.h
--r--r--r-- 1 mts mts  7008 Jun  3 01:06 hgfs.h
--r--r--r-- 1 mts mts  8689 Jun  3 01:06 hgfsBd.c
--r--r--r-- 1 mts mts  1450 Jun  3 01:06 hgfsBd.h
--r--r--r-- 1 mts mts 39298 Jun  3 01:06 hgfsProto.h
--r--r--r-- 1 mts mts  6822 Jun  3 01:06 hgfsUtil.c
--r--r--r-- 1 mts mts  3737 Jun  3 01:06 hgfsUtil.h
--r--r--r-- 1 mts mts  5685 Jun  3 01:06 hgfs_kernel.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts  4774 Jun  3 01:06 kernelStubs.h
--r--r--r-- 1 mts mts  6043 Jun  3 01:06 kernelStubsBSD.c
--r--r--r-- 1 mts mts  8254 Jun  3 01:06 message.c
--r--r--r-- 1 mts mts  3529 Jun  3 01:06 message.h
--r--r--r-- 1 mts mts 17265 Jun  3 01:06 messageBackdoor.c
--r--r--r-- 1 mts mts 16112 Jun  3 01:05 os.c
--r--r--r-- 1 mts mts  4229 Jun  3 01:06 os.h
--r--r--r-- 1 mts mts 22550 Jun  3 01:05 request.c
--r--r--r-- 1 mts mts  3184 Jun  3 01:06 request.h
--r--r--r-- 1 mts mts  6298 Jun  3 01:06 requestInt.h
--r--r--r-- 1 mts mts 11975 Jun  3 01:06 rpcout.c
--r--r--r-- 1 mts mts  1963 Jun  3 01:06 rpcout.h
--r--r--r-- 1 mts mts  6515 Jun  3 01:06 sha1.c
--r--r--r-- 1 mts mts  2207 Jun  3 01:06 sha1.h
--r--r--r-- 1 mts mts 46819 Jun  3 01:06 state.c
--r--r--r-- 1 mts mts  6710 Jun  3 01:06 state.h
--r--r--r-- 1 mts mts  8823 Jun  3 01:06 staticEscape.c
--r--r--r-- 1 mts mts  2481 Jun  3 01:06 staticEscape.h
--r--r--r-- 1 mts mts  9540 Jun  3 01:05 vfsops.c
--r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
--r--r--r-- 1 mts mts 17697 Jun  3 01:06 vm_basic_asm.h
--r--r--r-- 1 mts mts 16113 Jun  3 01:06 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8944 Jun  3 01:06 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts  1889 Jun  3 01:06 vmware.h
--r--r--r-- 1 mts mts  1316 Jun  3 01:06 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1336 Jun  3 01:06 vmware_pack_end.h
--r--r--r-- 1 mts mts  1956 Jun  3 01:06 vmware_pack_init.h
--r--r--r-- 1 mts mts 23185 Jun  3 01:05 vnops.c
--r--r--r-- 1 mts mts 77726 Jun  3 01:06 vnopscommon.c
--r--r--r-- 1 mts mts  3216 Jun  3 01:06 vnopscommon.h
--r--r--r-- 1 mts mts  6265 Jun  3 01:06 worker.c
--r--r--r-- 1 mts mts 37947 Jun  3 01:06 x86cpuid.h
-
-open-vm-tools-2008.06.03-96374/modules/freebsd/vmmemctl:
+drwxr-xr-x 2 mts mts 4096 Jun 21 00:01 vmblock
+drwxr-xr-x 2 mts mts 4096 Jun 21 00:01 vmhgfs
+drwxr-xr-x 2 mts mts 4096 Jun 21 00:01 vmmemctl
+drwxr-xr-x 2 mts mts 4096 Jun 21 00:01 vmxnet
+
+open-vm-tools-2008.06.20-100027/modules/freebsd/vmblock:
+total 228
+-r--r--r-- 1 mts mts  1430 Jun 21 00:01 COPYING.BSD
+-r--r--r-- 1 mts mts  2203 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts 17267 Jun 21 00:01 block.c
+-r--r--r-- 1 mts mts  2375 Jun 21 00:01 block.h
+-r--r--r-- 1 mts mts  2137 Jun 21 00:01 compat_freebsd.h
+-r--r--r-- 1 mts mts  3217 Jun 21 00:01 compat_vop.h
+-r--r--r-- 1 mts mts  9054 Jun 21 00:01 dbllnklst.c
+-r--r--r-- 1 mts mts  3187 Jun 21 00:01 dbllnklst.h
+-r--r--r-- 1 mts mts     0 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  5980 Jun 21 00:01 os.h
+-r--r--r-- 1 mts mts  2141 Jun 21 00:01 stubs.c
+-r--r--r-- 1 mts mts  1888 Jun 21 00:01 stubs.h
+-r--r--r-- 1 mts mts 19458 Jun 21 00:01 subr.c
+-r--r--r-- 1 mts mts 13132 Jun 21 00:01 vfsops.c
+-r--r--r-- 1 mts mts 10783 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 14130 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 22577 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  5163 Jun 21 00:01 vmblock.h
+-r--r--r-- 1 mts mts  5872 Jun 21 00:01 vmblock_k.h
+-r--r--r-- 1 mts mts  2720 Jun 21 00:01 vmware.h
+-r--r--r-- 1 mts mts 46154 Jun 21 00:01 vnops.c
+
+open-vm-tools-2008.06.20-100027/modules/freebsd/vmhgfs:
+total 776
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  2704 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  6383 Jun 21 00:01 backdoor.c
+-r--r--r-- 1 mts mts  1337 Jun 21 00:01 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun 21 00:01 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun 21 00:01 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun 21 00:01 backdoorInt.h
+-r--r--r-- 1 mts mts  5883 Jun 21 00:01 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun 21 00:01 backdoor_types.h
+-r--r--r-- 1 mts mts  1306 Jun 21 00:01 compat_freebsd.h
+-r--r--r-- 1 mts mts  2386 Jun 21 00:01 compat_vop.h
+-r--r--r-- 1 mts mts 12045 Jun 21 00:01 cpName.c
+-r--r--r-- 1 mts mts  4174 Jun 21 00:01 cpName.h
+-r--r--r-- 1 mts mts  1798 Jun 21 00:01 cpNameInt.h
+-r--r--r-- 1 mts mts  5763 Jun 21 00:01 cpNameLinux.c
+-r--r--r-- 1 mts mts  2642 Jun 21 00:01 cpNameLite.c
+-r--r--r-- 1 mts mts  1710 Jun 21 00:01 cpNameLite.h
+-r--r--r-- 1 mts mts  8223 Jun 21 00:01 dbllnklst.c
+-r--r--r-- 1 mts mts  2356 Jun 21 00:01 dbllnklst.h
+-r--r--r-- 1 mts mts  4769 Jun 21 00:01 debug.c
+-r--r--r-- 1 mts mts  3358 Jun 21 00:01 debug.h
+-r--r--r-- 1 mts mts  3832 Jun 21 00:01 escBitvector.h
+-r--r--r-- 1 mts mts 25043 Jun 21 00:01 fsutil.c
+-r--r--r-- 1 mts mts  3506 Jun 21 00:01 fsutil.h
+-r--r--r-- 1 mts mts  3006 Jun 21 00:01 guest_msg_def.h
+-r--r--r-- 1 mts mts  7817 Jun 21 00:01 hgfs.h
+-r--r--r-- 1 mts mts  9820 Jun 21 00:01 hgfsBd.c
+-r--r--r-- 1 mts mts  1483 Jun 21 00:01 hgfsBd.h
+-r--r--r-- 1 mts mts 39481 Jun 21 00:01 hgfsProto.h
+-r--r--r-- 1 mts mts  6971 Jun 21 00:01 hgfsUtil.c
+-r--r--r-- 1 mts mts  4152 Jun 21 00:01 hgfsUtil.h
+-r--r--r-- 1 mts mts  5567 Jun 21 00:01 hgfs_kernel.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  4774 Jun 21 00:01 kernelStubs.h
+-r--r--r-- 1 mts mts  6043 Jun 21 00:01 kernelStubsBSD.c
+-r--r--r-- 1 mts mts  8254 Jun 21 00:01 message.c
+-r--r--r-- 1 mts mts  3529 Jun 21 00:01 message.h
+-r--r--r-- 1 mts mts 17265 Jun 21 00:01 messageBackdoor.c
+-r--r--r-- 1 mts mts 16182 Jun 21 00:01 os.c
+-r--r--r-- 1 mts mts  4280 Jun 21 00:01 os.h
+-r--r--r-- 1 mts mts 22550 Jun 21 00:01 request.c
+-r--r--r-- 1 mts mts  3184 Jun 21 00:01 request.h
+-r--r--r-- 1 mts mts  6298 Jun 21 00:01 requestInt.h
+-r--r--r-- 1 mts mts 11975 Jun 21 00:01 rpcout.c
+-r--r--r-- 1 mts mts  1963 Jun 21 00:01 rpcout.h
+-r--r--r-- 1 mts mts  6515 Jun 21 00:01 sha1.c
+-r--r--r-- 1 mts mts  2207 Jun 21 00:01 sha1.h
+-r--r--r-- 1 mts mts 46856 Jun 21 00:01 state.c
+-r--r--r-- 1 mts mts  6710 Jun 21 00:01 state.h
+-r--r--r-- 1 mts mts  8823 Jun 21 00:01 staticEscape.c
+-r--r--r-- 1 mts mts  2481 Jun 21 00:01 staticEscape.h
+-r--r--r-- 1 mts mts  9674 Jun 21 00:01 vfsops.c
+-r--r--r-- 1 mts mts  9952 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 17697 Jun 21 00:01 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16365 Jun 21 00:01 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  8976 Jun 21 00:01 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 13299 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  1889 Jun 21 00:01 vmware.h
+-r--r--r-- 1 mts mts  1316 Jun 21 00:01 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1336 Jun 21 00:01 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1956 Jun 21 00:01 vmware_pack_init.h
+-r--r--r-- 1 mts mts 22339 Jun 21 00:01 vnops.c
+-r--r--r-- 1 mts mts 77726 Jun 21 00:01 vnopscommon.c
+-r--r--r-- 1 mts mts  3216 Jun 21 00:01 vnopscommon.h
+-r--r--r-- 1 mts mts  6265 Jun 21 00:01 worker.c
+-r--r--r-- 1 mts mts 39492 Jun 21 00:01 x86cpuid.h
+
+open-vm-tools-2008.06.20-100027/modules/freebsd/vmmemctl:
 total 184
--r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1259 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts   430 Jun  3 01:06 README
--r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
--r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
--r--r--r-- 1 mts mts  1338 Jun  3 01:06 backdoor_balloon.h
--r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
--r--r--r-- 1 mts mts  2622 Jun  3 01:06 balloon_def.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts 10240 Jun  3 01:06 os.c
--r--r--r-- 1 mts mts  2441 Jun  3 01:06 os.h
--r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
--r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts 37545 Jun  3 01:06 vmballoon.c
--r--r--r-- 1 mts mts  2048 Jun  3 01:06 vmballoon.h
-
-open-vm-tools-2008.06.03-96374/modules/freebsd/vmxnet:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1259 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts   430 Jun 21 00:01 README
+-r--r--r-- 1 mts mts  1337 Jun 21 00:01 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun 21 00:01 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun 21 00:01 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun 21 00:01 backdoorInt.h
+-r--r--r-- 1 mts mts  1338 Jun 21 00:01 backdoor_balloon.h
+-r--r--r-- 1 mts mts  3543 Jun 21 00:01 backdoor_types.h
+-r--r--r-- 1 mts mts  2622 Jun 21 00:01 balloon_def.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts 10240 Jun 21 00:01 os.c
+-r--r--r-- 1 mts mts  2441 Jun 21 00:01 os.h
+-r--r--r-- 1 mts mts  9952 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 13299 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts 37545 Jun 21 00:01 vmballoon.c
+-r--r--r-- 1 mts mts  2048 Jun 21 00:01 vmballoon.h
+
+open-vm-tools-2008.06.20-100027/modules/freebsd/vmxnet:
 total 136
--r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1222 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts 35544 Jun  3 01:06 if_vxn.c
--r--r--r-- 1 mts mts     0 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts  2426 Jun  3 01:06 net.h
--r--r--r-- 1 mts mts  6515 Jun  3 01:06 net_compat.h
--r--r--r-- 1 mts mts  2240 Jun  3 01:06 net_sg.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts  7197 Jun  3 01:06 vm_device_version.h
--r--r--r-- 1 mts mts  3180 Jun  3 01:06 vmnet_def.h
--r--r--r-- 1 mts mts 14595 Jun  3 01:06 vmxnet2_def.h
--r--r--r-- 1 mts mts  6793 Jun  3 01:06 vmxnet_def.h
-
-open-vm-tools-2008.06.03-96374/modules/linux:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1222 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts 35570 Jun 21 00:01 if_vxn.c
+-r--r--r-- 1 mts mts     0 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  2426 Jun 21 00:01 net.h
+-r--r--r-- 1 mts mts  6515 Jun 21 00:01 net_compat.h
+-r--r--r-- 1 mts mts  2240 Jun 21 00:01 net_sg.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  7197 Jun 21 00:01 vm_device_version.h
+-r--r--r-- 1 mts mts  3180 Jun 21 00:01 vmnet_def.h
+-r--r--r-- 1 mts mts 14498 Jun 21 00:01 vmxnet2_def.h
+-r--r--r-- 1 mts mts  6680 Jun 21 00:01 vmxnet_def.h
+
+open-vm-tools-2008.06.20-100027/modules/linux:
 total 20
-drwxr-xr-x 5 mts mts 4096 Jun  3 01:05 vmblock
-drwxr-xr-x 3 mts mts 4096 Jun  3 01:05 vmhgfs
-drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmmemctl
-drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmsync
-drwxr-xr-x 3 mts mts 4096 Jun  3 01:06 vmxnet
+drwxr-xr-x 5 mts mts 4096 Jun 21 00:01 vmblock
+drwxr-xr-x 3 mts mts 4096 Jun 21 00:01 vmhgfs
+drwxr-xr-x 3 mts mts 4096 Jun 21 00:01 vmmemctl
+drwxr-xr-x 3 mts mts 4096 Jun 21 00:01 vmsync
+drwxr-xr-x 3 mts mts 4096 Jun 21 00:01 vmxnet
 
-open-vm-tools-2008.06.03-96374/modules/linux/vmblock:
+open-vm-tools-2008.06.20-100027/modules/linux/vmblock:
 total 52
--r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
--r--r--r-- 1 mts mts  3761 Jun  3 01:05 Makefile
--r--r--r-- 1 mts mts  2009 Jun  3 01:05 Makefile.kernel
--r--r--r-- 1 mts mts  4136 Jun  3 01:05 Makefile.normal
--r--r--r-- 1 mts mts   481 Jun  3 01:05 README
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 autoconf
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 include
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 linux
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmblock/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3761 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  2009 Jun 21 00:01 Makefile.kernel
+-r--r--r-- 1 mts mts  4136 Jun 21 00:01 Makefile.normal
+-r--r--r-- 1 mts mts   481 Jun 21 00:01 README
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 autoconf
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 include
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 linux
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmblock/autoconf:
 total 36
--r--r--r-- 1 mts mts 1670 Jun  3 01:05 cachecreate.c
--r--r--r-- 1 mts mts 1718 Jun  3 01:05 cachector.c
--r--r--r-- 1 mts mts 1261 Jun  3 01:05 epoll.c
--r--r--r-- 1 mts mts 1710 Jun  3 01:05 filldir1.c
--r--r--r-- 1 mts mts 1204 Jun  3 01:05 geninclude.c
--r--r--r-- 1 mts mts 1596 Jun  3 01:05 getsb1.c
--r--r--r-- 1 mts mts 1139 Jun  3 01:05 setnice.c
--r--r--r-- 1 mts mts 1259 Jun  3 01:05 skas1.c
--r--r--r-- 1 mts mts 1463 Jun  3 01:05 statfs1.c
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmblock/include:
+-r--r--r-- 1 mts mts 1670 Jun 21 00:01 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun 21 00:01 cachector.c
+-r--r--r-- 1 mts mts 1261 Jun 21 00:01 epoll.c
+-r--r--r-- 1 mts mts 1710 Jun 21 00:01 filldir1.c
+-r--r--r-- 1 mts mts 1204 Jun 21 00:01 geninclude.c
+-r--r--r-- 1 mts mts 1596 Jun 21 00:01 getsb1.c
+-r--r--r-- 1 mts mts 1139 Jun 21 00:01 setnice.c
+-r--r--r-- 1 mts mts 1259 Jun 21 00:01 skas1.c
+-r--r--r-- 1 mts mts 1463 Jun 21 00:01 statfs1.c
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmblock/include:
 total 172
--r--r--r-- 1 mts mts  6088 Jun  3 01:05 compat_completion.h
--r--r--r-- 1 mts mts  1875 Jun  3 01:05 compat_file.h
--r--r--r-- 1 mts mts  9850 Jun  3 01:05 compat_fs.h
--r--r--r-- 1 mts mts  1261 Jun  3 01:05 compat_init.h
--r--r--r-- 1 mts mts  2659 Jun  3 01:05 compat_kernel.h
--r--r--r-- 1 mts mts  1917 Jun  3 01:05 compat_list.h
--r--r--r-- 1 mts mts  4231 Jun  3 01:05 compat_mm.h
--r--r--r-- 1 mts mts  2298 Jun  3 01:05 compat_module.h
--r--r--r-- 1 mts mts  2118 Jun  3 01:05 compat_namei.h
--r--r--r-- 1 mts mts  2483 Jun  3 01:05 compat_page.h
--r--r--r-- 1 mts mts  9843 Jun  3 01:05 compat_sched.h
--r--r--r-- 1 mts mts  1456 Jun  3 01:05 compat_semaphore.h
--r--r--r-- 1 mts mts  2764 Jun  3 01:05 compat_slab.h
--r--r--r-- 1 mts mts  2438 Jun  3 01:05 compat_spinlock.h
--r--r--r-- 1 mts mts  1222 Jun  3 01:05 compat_statfs.h
--r--r--r-- 1 mts mts  1907 Jun  3 01:05 compat_string.h
--r--r--r-- 1 mts mts  3122 Jun  3 01:05 compat_uaccess.h
--r--r--r-- 1 mts mts  3189 Jun  3 01:05 compat_version.h
--r--r--r-- 1 mts mts  6854 Jun  3 01:05 compat_wait.h
--r--r--r-- 1 mts mts  2216 Jun  3 01:05 driver-config.h
--r--r--r-- 1 mts mts     0 Jun  3 01:05 includeCheck.h
--r--r--r-- 1 mts mts  9952 Jun  3 01:05 vm_assert.h
--r--r--r-- 1 mts mts 12608 Jun  3 01:05 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:05 vm_basic_types.h
--r--r--r-- 1 mts mts  4332 Jun  3 01:05 vmblock.h
--r--r--r-- 1 mts mts  1889 Jun  3 01:05 vmware.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmblock/linux:
+-r--r--r-- 1 mts mts  6088 Jun 21 00:01 compat_completion.h
+-r--r--r-- 1 mts mts  1875 Jun 21 00:01 compat_file.h
+-r--r--r-- 1 mts mts  9850 Jun 21 00:01 compat_fs.h
+-r--r--r-- 1 mts mts  1261 Jun 21 00:01 compat_init.h
+-r--r--r-- 1 mts mts  2659 Jun 21 00:01 compat_kernel.h
+-r--r--r-- 1 mts mts  1917 Jun 21 00:01 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun 21 00:01 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun 21 00:01 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun 21 00:01 compat_namei.h
+-r--r--r-- 1 mts mts  2483 Jun 21 00:01 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun 21 00:01 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun 21 00:01 compat_semaphore.h
+-r--r--r-- 1 mts mts  2764 Jun 21 00:01 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun 21 00:01 compat_spinlock.h
+-r--r--r-- 1 mts mts  1222 Jun 21 00:01 compat_statfs.h
+-r--r--r-- 1 mts mts  1907 Jun 21 00:01 compat_string.h
+-r--r--r-- 1 mts mts  3122 Jun 21 00:01 compat_uaccess.h
+-r--r--r-- 1 mts mts  3189 Jun 21 00:01 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun 21 00:01 compat_wait.h
+-r--r--r-- 1 mts mts  2216 Jun 21 00:01 driver-config.h
+-r--r--r-- 1 mts mts     0 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  9952 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 13299 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  4332 Jun 21 00:01 vmblock.h
+-r--r--r-- 1 mts mts  1889 Jun 21 00:01 vmware.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmblock/linux:
 total 140
--r--r--r-- 1 mts mts 16436 Jun  3 01:05 block.c
--r--r--r-- 1 mts mts  1544 Jun  3 01:05 block.h
--r--r--r-- 1 mts mts  8732 Jun  3 01:05 control.c
--r--r--r-- 1 mts mts  8223 Jun  3 01:05 dbllnklst.c
--r--r--r-- 1 mts mts  2356 Jun  3 01:05 dbllnklst.h
--r--r--r-- 1 mts mts  3749 Jun  3 01:05 dentry.c
--r--r--r-- 1 mts mts  8089 Jun  3 01:05 file.c
--r--r--r-- 1 mts mts 20088 Jun  3 01:05 filesystem.c
--r--r--r-- 1 mts mts  4856 Jun  3 01:05 filesystem.h
--r--r--r-- 1 mts mts  6794 Jun  3 01:05 inode.c
--r--r--r-- 1 mts mts  4286 Jun  3 01:05 module.c
--r--r--r-- 1 mts mts  4292 Jun  3 01:05 os.h
--r--r--r-- 1 mts mts  1310 Jun  3 01:05 stubs.c
--r--r--r-- 1 mts mts  1057 Jun  3 01:05 stubs.h
--r--r--r-- 1 mts mts  5026 Jun  3 01:05 super.c
--r--r--r-- 1 mts mts  3351 Jun  3 01:05 vmblockInt.h
--r--r--r-- 1 mts mts  1176 Jun  3 01:05 vmblock_version.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmhgfs:
-total 920
--r--r--r-- 1 mts mts 17987 Jun  3 01:05 COPYING
--r--r--r-- 1 mts mts  3760 Jun  3 01:05 Makefile
--r--r--r-- 1 mts mts  2291 Jun  3 01:05 Makefile.kernel
--r--r--r-- 1 mts mts  3429 Jun  3 01:05 Makefile.normal
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:05 autoconf
--r--r--r-- 1 mts mts  6383 Jun  3 01:05 backdoor.c
--r--r--r-- 1 mts mts  1337 Jun  3 01:05 backdoor.h
--r--r--r-- 1 mts mts  6174 Jun  3 01:05 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 Jun  3 01:05 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 Jun  3 01:05 backdoorInt.h
--r--r--r-- 1 mts mts  5883 Jun  3 01:05 backdoor_def.h
--r--r--r-- 1 mts mts  3543 Jun  3 01:05 backdoor_types.h
--r--r--r-- 1 mts mts  9078 Jun  3 01:05 bdhandler.c
--r--r--r-- 1 mts mts  1167 Jun  3 01:05 bdhandler.h
--r--r--r-- 1 mts mts  6088 Jun  3 01:05 compat_completion.h
--r--r--r-- 1 mts mts  2052 Jun  3 01:05 compat_dcache.h
--r--r--r-- 1 mts mts  1875 Jun  3 01:05 compat_file.h
--r--r--r-- 1 mts mts  9850 Jun  3 01:05 compat_fs.h
--r--r--r-- 1 mts mts  1391 Jun  3 01:05 compat_highmem.h
--r--r--r-- 1 mts mts  2659 Jun  3 01:05 compat_kernel.h
--r--r--r-- 1 mts mts  8066 Jun  3 01:05 compat_kthread.h
--r--r--r-- 1 mts mts  1917 Jun  3 01:05 compat_list.h
--r--r--r-- 1 mts mts  4231 Jun  3 01:05 compat_mm.h
--r--r--r-- 1 mts mts  2298 Jun  3 01:05 compat_module.h
--r--r--r-- 1 mts mts  2118 Jun  3 01:05 compat_namei.h
--r--r--r-- 1 mts mts  2591 Jun  3 01:05 compat_page-flags.h
--r--r--r-- 1 mts mts  2483 Jun  3 01:05 compat_page.h
--r--r--r-- 1 mts mts  9843 Jun  3 01:05 compat_sched.h
--r--r--r-- 1 mts mts  1456 Jun  3 01:05 compat_semaphore.h
--r--r--r-- 1 mts mts  2764 Jun  3 01:05 compat_slab.h
--r--r--r-- 1 mts mts  2438 Jun  3 01:05 compat_spinlock.h
--r--r--r-- 1 mts mts  1222 Jun  3 01:05 compat_statfs.h
--r--r--r-- 1 mts mts  1907 Jun  3 01:05 compat_string.h
--r--r--r-- 1 mts mts  3122 Jun  3 01:05 compat_uaccess.h
--r--r--r-- 1 mts mts  3189 Jun  3 01:05 compat_version.h
--r--r--r-- 1 mts mts  6854 Jun  3 01:05 compat_wait.h
--r--r--r-- 1 mts mts 12045 Jun  3 01:05 cpName.c
--r--r--r-- 1 mts mts  4174 Jun  3 01:05 cpName.h
--r--r--r-- 1 mts mts  1798 Jun  3 01:05 cpNameInt.h
--r--r--r-- 1 mts mts  5763 Jun  3 01:05 cpNameLinux.c
--r--r--r-- 1 mts mts  2642 Jun  3 01:05 cpNameLite.c
--r--r--r-- 1 mts mts  1710 Jun  3 01:05 cpNameLite.h
--r--r--r-- 1 mts mts  2356 Jun  3 01:05 dbllnklst.h
--r--r--r-- 1 mts mts  3112 Jun  3 01:05 dentry.c
--r--r--r-- 1 mts mts 27691 Jun  3 01:05 dir.c
--r--r--r-- 1 mts mts  2216 Jun  3 01:05 driver-config.h
--r--r--r-- 1 mts mts  3832 Jun  3 01:05 escBitvector.h
--r--r--r-- 1 mts mts 36665 Jun  3 01:05 file.c
--r--r--r-- 1 mts mts 20469 Jun  3 01:05 filesystem.c
--r--r--r-- 1 mts mts  1232 Jun  3 01:05 filesystem.h
--r--r--r-- 1 mts mts 57267 Jun  3 01:05 fsutil.c
--r--r--r-- 1 mts mts  3980 Jun  3 01:05 fsutil.h
--r--r--r-- 1 mts mts  3006 Jun  3 01:05 guest_msg_def.h
--r--r--r-- 1 mts mts  7008 Jun  3 01:05 hgfs.h
--r--r--r-- 1 mts mts  8689 Jun  3 01:05 hgfsBd.c
--r--r--r-- 1 mts mts  1450 Jun  3 01:05 hgfsBd.h
--r--r--r-- 1 mts mts  2535 Jun  3 01:05 hgfsDevLinux.h
--r--r--r-- 1 mts mts 39298 Jun  3 01:05 hgfsProto.h
--r--r--r-- 1 mts mts  6822 Jun  3 01:05 hgfsUtil.c
--r--r--r-- 1 mts mts  3737 Jun  3 01:05 hgfsUtil.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:05 includeCheck.h
--r--r--r-- 1 mts mts 64198 Jun  3 01:05 inode.c
--r--r--r-- 1 mts mts  1318 Jun  3 01:05 inode.h
--r--r--r-- 1 mts mts  4774 Jun  3 01:05 kernelStubs.h
--r--r--r-- 1 mts mts  9629 Jun  3 01:05 kernelStubsLinux.c
--r--r--r-- 1 mts mts  5268 Jun  3 01:05 link.c
--r--r--r-- 1 mts mts  8254 Jun  3 01:05 message.c
--r--r--r-- 1 mts mts  3529 Jun  3 01:05 message.h
--r--r--r-- 1 mts mts 17265 Jun  3 01:05 messageBackdoor.c
--r--r--r-- 1 mts mts  2677 Jun  3 01:05 module.c
--r--r--r-- 1 mts mts  8991 Jun  3 01:05 module.h
--r--r--r-- 1 mts mts 27078 Jun  3 01:05 page.c
--r--r--r-- 1 mts mts  7026 Jun  3 01:05 request.c
--r--r--r-- 1 mts mts  3951 Jun  3 01:05 request.h
--r--r--r-- 1 mts mts 11975 Jun  3 01:05 rpcout.c
--r--r--r-- 1 mts mts  1963 Jun  3 01:05 rpcout.h
--r--r--r-- 1 mts mts  8823 Jun  3 01:05 staticEscape.c
--r--r--r-- 1 mts mts  2481 Jun  3 01:05 staticEscape.h
--r--r--r-- 1 mts mts  1985 Jun  3 01:05 stubs.c
--r--r--r-- 1 mts mts 12772 Jun  3 01:05 super.c
--r--r--r-- 1 mts mts  9952 Jun  3 01:05 vm_assert.h
--r--r--r-- 1 mts mts 17697 Jun  3 01:05 vm_basic_asm.h
--r--r--r-- 1 mts mts 16113 Jun  3 01:05 vm_basic_asm_x86.h
--r--r--r-- 1 mts mts  8944 Jun  3 01:05 vm_basic_asm_x86_64.h
--r--r--r-- 1 mts mts 12608 Jun  3 01:05 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:05 vm_basic_types.h
--r--r--r-- 1 mts mts  1168 Jun  3 01:05 vmhgfs_version.h
--r--r--r-- 1 mts mts  1889 Jun  3 01:05 vmware.h
--r--r--r-- 1 mts mts  1316 Jun  3 01:05 vmware_pack_begin.h
--r--r--r-- 1 mts mts  1336 Jun  3 01:05 vmware_pack_end.h
--r--r--r-- 1 mts mts  1956 Jun  3 01:05 vmware_pack_init.h
--r--r--r-- 1 mts mts 37947 Jun  3 01:05 x86cpuid.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmhgfs/autoconf:
+-r--r--r-- 1 mts mts 16436 Jun 21 00:01 block.c
+-r--r--r-- 1 mts mts  1544 Jun 21 00:01 block.h
+-r--r--r-- 1 mts mts  8732 Jun 21 00:01 control.c
+-r--r--r-- 1 mts mts  8223 Jun 21 00:01 dbllnklst.c
+-r--r--r-- 1 mts mts  2356 Jun 21 00:01 dbllnklst.h
+-r--r--r-- 1 mts mts  3749 Jun 21 00:01 dentry.c
+-r--r--r-- 1 mts mts  8089 Jun 21 00:01 file.c
+-r--r--r-- 1 mts mts 20088 Jun 21 00:01 filesystem.c
+-r--r--r-- 1 mts mts  4856 Jun 21 00:01 filesystem.h
+-r--r--r-- 1 mts mts  6794 Jun 21 00:01 inode.c
+-r--r--r-- 1 mts mts  4286 Jun 21 00:01 module.c
+-r--r--r-- 1 mts mts  4300 Jun 21 00:01 os.h
+-r--r--r-- 1 mts mts  1310 Jun 21 00:01 stubs.c
+-r--r--r-- 1 mts mts  1057 Jun 21 00:01 stubs.h
+-r--r--r-- 1 mts mts  5026 Jun 21 00:01 super.c
+-r--r--r-- 1 mts mts  3351 Jun 21 00:01 vmblockInt.h
+-r--r--r-- 1 mts mts  1176 Jun 21 00:01 vmblock_version.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmhgfs:
+total 924
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3760 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  2291 Jun 21 00:01 Makefile.kernel
+-r--r--r-- 1 mts mts  3429 Jun 21 00:01 Makefile.normal
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 autoconf
+-r--r--r-- 1 mts mts  6383 Jun 21 00:01 backdoor.c
+-r--r--r-- 1 mts mts  1337 Jun 21 00:01 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun 21 00:01 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun 21 00:01 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun 21 00:01 backdoorInt.h
+-r--r--r-- 1 mts mts  5883 Jun 21 00:01 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun 21 00:01 backdoor_types.h
+-r--r--r-- 1 mts mts  9078 Jun 21 00:01 bdhandler.c
+-r--r--r-- 1 mts mts  1167 Jun 21 00:01 bdhandler.h
+-r--r--r-- 1 mts mts  6088 Jun 21 00:01 compat_completion.h
+-r--r--r-- 1 mts mts  2052 Jun 21 00:01 compat_dcache.h
+-r--r--r-- 1 mts mts  1875 Jun 21 00:01 compat_file.h
+-r--r--r-- 1 mts mts  9850 Jun 21 00:01 compat_fs.h
+-r--r--r-- 1 mts mts  1391 Jun 21 00:01 compat_highmem.h
+-r--r--r-- 1 mts mts  2659 Jun 21 00:01 compat_kernel.h
+-r--r--r-- 1 mts mts  8066 Jun 21 00:01 compat_kthread.h
+-r--r--r-- 1 mts mts  1917 Jun 21 00:01 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun 21 00:01 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun 21 00:01 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun 21 00:01 compat_namei.h
+-r--r--r-- 1 mts mts  2591 Jun 21 00:01 compat_page-flags.h
+-r--r--r-- 1 mts mts  2483 Jun 21 00:01 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun 21 00:01 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun 21 00:01 compat_semaphore.h
+-r--r--r-- 1 mts mts  2764 Jun 21 00:01 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun 21 00:01 compat_spinlock.h
+-r--r--r-- 1 mts mts  1222 Jun 21 00:01 compat_statfs.h
+-r--r--r-- 1 mts mts  1907 Jun 21 00:01 compat_string.h
+-r--r--r-- 1 mts mts  3122 Jun 21 00:01 compat_uaccess.h
+-r--r--r-- 1 mts mts  3189 Jun 21 00:01 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun 21 00:01 compat_wait.h
+-r--r--r-- 1 mts mts 12045 Jun 21 00:01 cpName.c
+-r--r--r-- 1 mts mts  4174 Jun 21 00:01 cpName.h
+-r--r--r-- 1 mts mts  1798 Jun 21 00:01 cpNameInt.h
+-r--r--r-- 1 mts mts  5763 Jun 21 00:01 cpNameLinux.c
+-r--r--r-- 1 mts mts  2642 Jun 21 00:01 cpNameLite.c
+-r--r--r-- 1 mts mts  1710 Jun 21 00:01 cpNameLite.h
+-r--r--r-- 1 mts mts  2356 Jun 21 00:01 dbllnklst.h
+-r--r--r-- 1 mts mts  3112 Jun 21 00:01 dentry.c
+-r--r--r-- 1 mts mts 27691 Jun 21 00:01 dir.c
+-r--r--r-- 1 mts mts  2216 Jun 21 00:01 driver-config.h
+-r--r--r-- 1 mts mts  3832 Jun 21 00:01 escBitvector.h
+-r--r--r-- 1 mts mts 36665 Jun 21 00:01 file.c
+-r--r--r-- 1 mts mts 20469 Jun 21 00:01 filesystem.c
+-r--r--r-- 1 mts mts  1232 Jun 21 00:01 filesystem.h
+-r--r--r-- 1 mts mts 57267 Jun 21 00:01 fsutil.c
+-r--r--r-- 1 mts mts  3980 Jun 21 00:01 fsutil.h
+-r--r--r-- 1 mts mts  3006 Jun 21 00:01 guest_msg_def.h
+-r--r--r-- 1 mts mts  7817 Jun 21 00:01 hgfs.h
+-r--r--r-- 1 mts mts  9820 Jun 21 00:01 hgfsBd.c
+-r--r--r-- 1 mts mts  1483 Jun 21 00:01 hgfsBd.h
+-r--r--r-- 1 mts mts  2535 Jun 21 00:01 hgfsDevLinux.h
+-r--r--r-- 1 mts mts 39481 Jun 21 00:01 hgfsProto.h
+-r--r--r-- 1 mts mts  6971 Jun 21 00:01 hgfsUtil.c
+-r--r--r-- 1 mts mts  4152 Jun 21 00:01 hgfsUtil.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts 64198 Jun 21 00:01 inode.c
+-r--r--r-- 1 mts mts  1318 Jun 21 00:01 inode.h
+-r--r--r-- 1 mts mts  4774 Jun 21 00:01 kernelStubs.h
+-r--r--r-- 1 mts mts  9629 Jun 21 00:01 kernelStubsLinux.c
+-r--r--r-- 1 mts mts  5268 Jun 21 00:01 link.c
+-r--r--r-- 1 mts mts  8254 Jun 21 00:01 message.c
+-r--r--r-- 1 mts mts  3529 Jun 21 00:01 message.h
+-r--r--r-- 1 mts mts 17265 Jun 21 00:01 messageBackdoor.c
+-r--r--r-- 1 mts mts  2677 Jun 21 00:01 module.c
+-r--r--r-- 1 mts mts  8991 Jun 21 00:01 module.h
+-r--r--r-- 1 mts mts 26877 Jun 21 00:01 page.c
+-r--r--r-- 1 mts mts  7026 Jun 21 00:01 request.c
+-r--r--r-- 1 mts mts  3951 Jun 21 00:01 request.h
+-r--r--r-- 1 mts mts 11975 Jun 21 00:01 rpcout.c
+-r--r--r-- 1 mts mts  1963 Jun 21 00:01 rpcout.h
+-r--r--r-- 1 mts mts  8823 Jun 21 00:01 staticEscape.c
+-r--r--r-- 1 mts mts  2481 Jun 21 00:01 staticEscape.h
+-r--r--r-- 1 mts mts  1985 Jun 21 00:01 stubs.c
+-r--r--r-- 1 mts mts 12772 Jun 21 00:01 super.c
+-r--r--r-- 1 mts mts  9952 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 17697 Jun 21 00:01 vm_basic_asm.h
+-r--r--r-- 1 mts mts 16365 Jun 21 00:01 vm_basic_asm_x86.h
+-r--r--r-- 1 mts mts  8976 Jun 21 00:01 vm_basic_asm_x86_64.h
+-r--r--r-- 1 mts mts 13299 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  1168 Jun 21 00:01 vmhgfs_version.h
+-r--r--r-- 1 mts mts  1889 Jun 21 00:01 vmware.h
+-r--r--r-- 1 mts mts  1316 Jun 21 00:01 vmware_pack_begin.h
+-r--r--r-- 1 mts mts  1336 Jun 21 00:01 vmware_pack_end.h
+-r--r--r-- 1 mts mts  1956 Jun 21 00:01 vmware_pack_init.h
+-r--r--r-- 1 mts mts 39492 Jun 21 00:01 x86cpuid.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmhgfs/autoconf:
 total 36
--r--r--r-- 1 mts mts 1670 Jun  3 01:05 cachecreate.c
--r--r--r-- 1 mts mts 1718 Jun  3 01:05 cachector.c
--r--r--r-- 1 mts mts 1261 Jun  3 01:05 epoll.c
--r--r--r-- 1 mts mts 1204 Jun  3 01:05 geninclude.c
--r--r--r-- 1 mts mts 1596 Jun  3 01:05 getsb1.c
--r--r--r-- 1 mts mts 1473 Jun  3 01:05 inode1.c
--r--r--r-- 1 mts mts 1345 Jun  3 01:05 maxbytes.c
--r--r--r-- 1 mts mts 1139 Jun  3 01:05 setnice.c
--r--r--r-- 1 mts mts 1463 Jun  3 01:05 statfs1.c
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmmemctl:
+-r--r--r-- 1 mts mts 1670 Jun 21 00:01 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun 21 00:01 cachector.c
+-r--r--r-- 1 mts mts 1261 Jun 21 00:01 epoll.c
+-r--r--r-- 1 mts mts 1204 Jun 21 00:01 geninclude.c
+-r--r--r-- 1 mts mts 1596 Jun 21 00:01 getsb1.c
+-r--r--r-- 1 mts mts 1473 Jun 21 00:01 inode1.c
+-r--r--r-- 1 mts mts 1345 Jun 21 00:01 maxbytes.c
+-r--r--r-- 1 mts mts 1139 Jun 21 00:01 setnice.c
+-r--r--r-- 1 mts mts 1463 Jun 21 00:01 statfs1.c
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmmemctl:
 total 292
--r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  3762 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts  1696 Jun  3 01:06 Makefile.kernel
--r--r--r-- 1 mts mts  2868 Jun  3 01:06 Makefile.normal
--r--r--r-- 1 mts mts   453 Jun  3 01:06 README
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
--r--r--r-- 1 mts mts  1337 Jun  3 01:06 backdoor.h
--r--r--r-- 1 mts mts  6174 Jun  3 01:06 backdoorGcc32.c
--r--r--r-- 1 mts mts  5550 Jun  3 01:06 backdoorGcc64.c
--r--r--r-- 1 mts mts  1032 Jun  3 01:06 backdoorInt.h
--r--r--r-- 1 mts mts  1338 Jun  3 01:06 backdoor_balloon.h
--r--r--r-- 1 mts mts  5883 Jun  3 01:06 backdoor_def.h
--r--r--r-- 1 mts mts  3543 Jun  3 01:06 backdoor_types.h
--r--r--r-- 1 mts mts  2622 Jun  3 01:06 balloon_def.h
--r--r--r-- 1 mts mts  6088 Jun  3 01:06 compat_completion.h
--r--r--r-- 1 mts mts  1875 Jun  3 01:06 compat_file.h
--r--r--r-- 1 mts mts  2659 Jun  3 01:06 compat_kernel.h
--r--r--r-- 1 mts mts  8066 Jun  3 01:06 compat_kthread.h
--r--r--r-- 1 mts mts  1917 Jun  3 01:06 compat_list.h
--r--r--r-- 1 mts mts  4231 Jun  3 01:06 compat_mm.h
--r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
--r--r--r-- 1 mts mts  2483 Jun  3 01:06 compat_page.h
--r--r--r-- 1 mts mts  9843 Jun  3 01:06 compat_sched.h
--r--r--r-- 1 mts mts  1456 Jun  3 01:06 compat_semaphore.h
--r--r--r-- 1 mts mts  2438 Jun  3 01:06 compat_spinlock.h
--r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
--r--r--r-- 1 mts mts  6854 Jun  3 01:06 compat_wait.h
--r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts 13341 Jun  3 01:06 os.c
--r--r--r-- 1 mts mts  2441 Jun  3 01:06 os.h
--r--r--r-- 1 mts mts  9952 Jun  3 01:06 vm_assert.h
--r--r--r-- 1 mts mts 12608 Jun  3 01:06 vm_basic_defs.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts 37545 Jun  3 01:06 vmballoon.c
--r--r--r-- 1 mts mts  2048 Jun  3 01:06 vmballoon.h
--r--r--r-- 1 mts mts  1193 Jun  3 01:06 vmmemctl_version.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmmemctl/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3762 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  1696 Jun 21 00:01 Makefile.kernel
+-r--r--r-- 1 mts mts  2868 Jun 21 00:01 Makefile.normal
+-r--r--r-- 1 mts mts   453 Jun 21 00:01 README
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 autoconf
+-r--r--r-- 1 mts mts  1337 Jun 21 00:01 backdoor.h
+-r--r--r-- 1 mts mts  6174 Jun 21 00:01 backdoorGcc32.c
+-r--r--r-- 1 mts mts  5550 Jun 21 00:01 backdoorGcc64.c
+-r--r--r-- 1 mts mts  1032 Jun 21 00:01 backdoorInt.h
+-r--r--r-- 1 mts mts  1338 Jun 21 00:01 backdoor_balloon.h
+-r--r--r-- 1 mts mts  5883 Jun 21 00:01 backdoor_def.h
+-r--r--r-- 1 mts mts  3543 Jun 21 00:01 backdoor_types.h
+-r--r--r-- 1 mts mts  2622 Jun 21 00:01 balloon_def.h
+-r--r--r-- 1 mts mts  6088 Jun 21 00:01 compat_completion.h
+-r--r--r-- 1 mts mts  1875 Jun 21 00:01 compat_file.h
+-r--r--r-- 1 mts mts  2659 Jun 21 00:01 compat_kernel.h
+-r--r--r-- 1 mts mts  8066 Jun 21 00:01 compat_kthread.h
+-r--r--r-- 1 mts mts  1917 Jun 21 00:01 compat_list.h
+-r--r--r-- 1 mts mts  4231 Jun 21 00:01 compat_mm.h
+-r--r--r-- 1 mts mts  2298 Jun 21 00:01 compat_module.h
+-r--r--r-- 1 mts mts  2483 Jun 21 00:01 compat_page.h
+-r--r--r-- 1 mts mts  9843 Jun 21 00:01 compat_sched.h
+-r--r--r-- 1 mts mts  1456 Jun 21 00:01 compat_semaphore.h
+-r--r--r-- 1 mts mts  2438 Jun 21 00:01 compat_spinlock.h
+-r--r--r-- 1 mts mts  3189 Jun 21 00:01 compat_version.h
+-r--r--r-- 1 mts mts  6854 Jun 21 00:01 compat_wait.h
+-r--r--r-- 1 mts mts  2216 Jun 21 00:01 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts 13341 Jun 21 00:01 os.c
+-r--r--r-- 1 mts mts  2441 Jun 21 00:01 os.h
+-r--r--r-- 1 mts mts  9952 Jun 21 00:01 vm_assert.h
+-r--r--r-- 1 mts mts 13299 Jun 21 00:01 vm_basic_defs.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts 37545 Jun 21 00:01 vmballoon.c
+-r--r--r-- 1 mts mts  2048 Jun 21 00:01 vmballoon.h
+-r--r--r-- 1 mts mts  1193 Jun 21 00:01 vmmemctl_version.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmmemctl/autoconf:
 total 12
--r--r--r-- 1 mts mts 1261 Jun  3 01:06 epoll.c
--r--r--r-- 1 mts mts 1204 Jun  3 01:06 geninclude.c
--r--r--r-- 1 mts mts 1139 Jun  3 01:06 setnice.c
+-r--r--r-- 1 mts mts 1261 Jun 21 00:01 epoll.c
+-r--r--r-- 1 mts mts 1204 Jun 21 00:01 geninclude.c
+-r--r--r-- 1 mts mts 1139 Jun 21 00:01 setnice.c
 
-open-vm-tools-2008.06.03-96374/modules/linux/vmsync:
+open-vm-tools-2008.06.20-100027/modules/linux/vmsync:
 total 108
--r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  3760 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts  1473 Jun  3 01:06 Makefile.kernel
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
--r--r--r-- 1 mts mts  9850 Jun  3 01:06 compat_fs.h
--r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
--r--r--r-- 1 mts mts  2118 Jun  3 01:06 compat_namei.h
--r--r--r-- 1 mts mts  2764 Jun  3 01:06 compat_slab.h
--r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
--r--r--r-- 1 mts mts  6345 Jun  3 01:06 compat_workqueue.h
--r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts 18797 Jun  3 01:06 sync.c
--r--r--r-- 1 mts mts  1540 Jun  3 01:06 syncDriverIoc.h
--r--r--r-- 1 mts mts  1168 Jun  3 01:06 vmsync_version.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmsync/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3760 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  1473 Jun 21 00:01 Makefile.kernel
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 autoconf
+-r--r--r-- 1 mts mts  9850 Jun 21 00:01 compat_fs.h
+-r--r--r-- 1 mts mts  2298 Jun 21 00:01 compat_module.h
+-r--r--r-- 1 mts mts  2118 Jun 21 00:01 compat_namei.h
+-r--r--r-- 1 mts mts  2764 Jun 21 00:01 compat_slab.h
+-r--r--r-- 1 mts mts  3189 Jun 21 00:01 compat_version.h
+-r--r--r-- 1 mts mts  6345 Jun 21 00:01 compat_workqueue.h
+-r--r--r-- 1 mts mts  2216 Jun 21 00:01 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts 18797 Jun 21 00:01 sync.c
+-r--r--r-- 1 mts mts  1540 Jun 21 00:01 syncDriverIoc.h
+-r--r--r-- 1 mts mts  1168 Jun 21 00:01 vmsync_version.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmsync/autoconf:
 total 8
--r--r--r-- 1 mts mts 1670 Jun  3 01:06 cachecreate.c
--r--r--r-- 1 mts mts 1718 Jun  3 01:06 cachector.c
+-r--r--r-- 1 mts mts 1670 Jun 21 00:01 cachecreate.c
+-r--r--r-- 1 mts mts 1718 Jun 21 00:01 cachector.c
 
-open-vm-tools-2008.06.03-96374/modules/linux/vmxnet:
+open-vm-tools-2008.06.20-100027/modules/linux/vmxnet:
 total 280
--r--r--r-- 1 mts mts 17987 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  3760 Jun  3 01:06 Makefile
--r--r--r-- 1 mts mts  1279 Jun  3 01:06 Makefile.kernel
--r--r--r-- 1 mts mts  2665 Jun  3 01:06 Makefile.normal
--r--r--r-- 1 mts mts   460 Jun  3 01:06 README
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 autoconf
--r--r--r-- 1 mts mts  1966 Jun  3 01:06 bpf_meta.h
--r--r--r-- 1 mts mts  1734 Jun  3 01:06 compat_ethtool.h
--r--r--r-- 1 mts mts  1391 Jun  3 01:06 compat_highmem.h
--r--r--r-- 1 mts mts  1261 Jun  3 01:06 compat_init.h
--r--r--r-- 1 mts mts  1700 Jun  3 01:06 compat_interrupt.h
--r--r--r-- 1 mts mts  2081 Jun  3 01:06 compat_ioport.h
--r--r--r-- 1 mts mts  2298 Jun  3 01:06 compat_module.h
--r--r--r-- 1 mts mts  8121 Jun  3 01:06 compat_netdevice.h
--r--r--r-- 1 mts mts 16725 Jun  3 01:06 compat_pci.h
--r--r--r-- 1 mts mts  6453 Jun  3 01:06 compat_skbuff.h
--r--r--r-- 1 mts mts  2764 Jun  3 01:06 compat_slab.h
--r--r--r-- 1 mts mts  2438 Jun  3 01:06 compat_spinlock.h
--r--r--r-- 1 mts mts  2795 Jun  3 01:06 compat_timer.h
--r--r--r-- 1 mts mts  3189 Jun  3 01:06 compat_version.h
--r--r--r-- 1 mts mts  2216 Jun  3 01:06 driver-config.h
--r--r--r-- 1 mts mts  4262 Jun  3 01:06 includeCheck.h
--r--r--r-- 1 mts mts  2426 Jun  3 01:06 net.h
--r--r--r-- 1 mts mts  2240 Jun  3 01:06 net_sg.h
--r--r--r-- 1 mts mts 21746 Jun  3 01:06 vm_basic_types.h
--r--r--r-- 1 mts mts  7197 Jun  3 01:06 vm_device_version.h
--r--r--r-- 1 mts mts  3180 Jun  3 01:06 vmnet_def.h
--r--r--r-- 1 mts mts 68841 Jun  3 01:06 vmxnet.c
--r--r--r-- 1 mts mts 14595 Jun  3 01:06 vmxnet2_def.h
--r--r--r-- 1 mts mts  3735 Jun  3 01:06 vmxnetInt.h
--r--r--r-- 1 mts mts  6793 Jun  3 01:06 vmxnet_def.h
--r--r--r-- 1 mts mts  1168 Jun  3 01:06 vmxnet_version.h
-
-open-vm-tools-2008.06.03-96374/modules/linux/vmxnet/autoconf:
+-r--r--r-- 1 mts mts 17987 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3760 Jun 21 00:01 Makefile
+-r--r--r-- 1 mts mts  1279 Jun 21 00:01 Makefile.kernel
+-r--r--r-- 1 mts mts  2665 Jun 21 00:01 Makefile.normal
+-r--r--r-- 1 mts mts   460 Jun 21 00:01 README
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 autoconf
+-r--r--r-- 1 mts mts  1734 Jun 21 00:01 compat_ethtool.h
+-r--r--r-- 1 mts mts  1391 Jun 21 00:01 compat_highmem.h
+-r--r--r-- 1 mts mts  1261 Jun 21 00:01 compat_init.h
+-r--r--r-- 1 mts mts  1700 Jun 21 00:01 compat_interrupt.h
+-r--r--r-- 1 mts mts  2081 Jun 21 00:01 compat_ioport.h
+-r--r--r-- 1 mts mts  2298 Jun 21 00:01 compat_module.h
+-r--r--r-- 1 mts mts  8121 Jun 21 00:01 compat_netdevice.h
+-r--r--r-- 1 mts mts 16725 Jun 21 00:01 compat_pci.h
+-r--r--r-- 1 mts mts  6453 Jun 21 00:01 compat_skbuff.h
+-r--r--r-- 1 mts mts  2764 Jun 21 00:01 compat_slab.h
+-r--r--r-- 1 mts mts  2438 Jun 21 00:01 compat_spinlock.h
+-r--r--r-- 1 mts mts  2795 Jun 21 00:01 compat_timer.h
+-r--r--r-- 1 mts mts  3189 Jun 21 00:01 compat_version.h
+-r--r--r-- 1 mts mts  2216 Jun 21 00:01 driver-config.h
+-r--r--r-- 1 mts mts  4262 Jun 21 00:01 includeCheck.h
+-r--r--r-- 1 mts mts  2426 Jun 21 00:01 net.h
+-r--r--r-- 1 mts mts  2240 Jun 21 00:01 net_sg.h
+-r--r--r-- 1 mts mts 21746 Jun 21 00:01 vm_basic_types.h
+-r--r--r-- 1 mts mts  7197 Jun 21 00:01 vm_device_version.h
+-r--r--r-- 1 mts mts  3180 Jun 21 00:01 vmnet_def.h
+-r--r--r-- 1 mts mts 69934 Jun 21 00:01 vmxnet.c
+-r--r--r-- 1 mts mts 14498 Jun 21 00:01 vmxnet2_def.h
+-r--r--r-- 1 mts mts  3735 Jun 21 00:01 vmxnetInt.h
+-r--r--r-- 1 mts mts  6680 Jun 21 00:01 vmxnet_def.h
+-r--r--r-- 1 mts mts  1168 Jun 21 00:01 vmxnet_version.h
+
+open-vm-tools-2008.06.20-100027/modules/linux/vmxnet/autoconf:
 total 8
--r--r--r-- 1 mts mts 1204 Jun  3 01:06 geninclude.c
--r--r--r-- 1 mts mts 1400 Jun  3 01:06 skblin.c
+-r--r--r-- 1 mts mts 1204 Jun 21 00:01 geninclude.c
+-r--r--r-- 1 mts mts 1400 Jun 21 00:01 skblin.c
 
-open-vm-tools-2008.06.03-96374/scripts:
+open-vm-tools-2008.06.20-100027/scripts:
 total 60
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts   260 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 10784 Jun  3 01:06 Makefile.in
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 common
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 freebsd
-drwxr-xr-x 3 mts mts  4096 Jun  3 01:06 linux
-drwxr-xr-x 2 mts mts  4096 Jun  3 01:06 solaris
-
-open-vm-tools-2008.06.03-96374/scripts/common:
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts   260 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 10802 Jun 21 00:01 Makefile.in
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 common
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 freebsd
+drwxr-xr-x 3 mts mts  4096 Jun 21 00:01 linux
+drwxr-xr-x 2 mts mts  4096 Jun 21 00:01 solaris
+
+open-vm-tools-2008.06.20-100027/scripts/common:
 total 16
--r--r--r-- 1 mts mts 7452 Jun  3 01:06 vm-support
--r--r--r-- 1 mts mts  277 Jun  3 01:06 vmware-toolbox.desktop
--r--r--r-- 1 mts mts  110 Jun  3 01:06 vmware-user.desktop
+-r--r--r-- 1 mts mts 7452 Jun 21 00:01 vm-support
+-r--r--r-- 1 mts mts  277 Jun 21 00:01 vmware-toolbox.desktop
+-r--r--r-- 1 mts mts  110 Jun 21 00:01 vmware-user.desktop
 
-open-vm-tools-2008.06.03-96374/scripts/freebsd:
+open-vm-tools-2008.06.20-100027/scripts/freebsd:
 total 16
--r--r--r-- 1 mts mts 1354 Jun  3 01:06 poweroff-vm-default
--r--r--r-- 1 mts mts 1353 Jun  3 01:06 poweron-vm-default
--r--r--r-- 1 mts mts 1393 Jun  3 01:06 resume-vm-default
--r--r--r-- 1 mts mts 1750 Jun  3 01:06 suspend-vm-default
+-r--r--r-- 1 mts mts 1354 Jun 21 00:01 poweroff-vm-default
+-r--r--r-- 1 mts mts 1353 Jun 21 00:01 poweron-vm-default
+-r--r--r-- 1 mts mts 1393 Jun 21 00:01 resume-vm-default
+-r--r--r-- 1 mts mts 1750 Jun 21 00:01 suspend-vm-default
 
-open-vm-tools-2008.06.03-96374/scripts/linux:
+open-vm-tools-2008.06.20-100027/scripts/linux:
 total 20
-drwxr-xr-x 2 mts mts 4096 Jun  3 01:06 pam.d
--r--r--r-- 1 mts mts 1351 Jun  3 01:06 poweroff-vm-default
--r--r--r-- 1 mts mts 1351 Jun  3 01:06 poweron-vm-default
--r--r--r-- 1 mts mts 3042 Jun  3 01:06 resume-vm-default
--r--r--r-- 1 mts mts 2638 Jun  3 01:06 suspend-vm-default
+drwxr-xr-x 2 mts mts 4096 Jun 21 00:01 pam.d
+-r--r--r-- 1 mts mts 1351 Jun 21 00:01 poweroff-vm-default
+-r--r--r-- 1 mts mts 1351 Jun 21 00:01 poweron-vm-default
+-r--r--r-- 1 mts mts 3042 Jun 21 00:01 resume-vm-default
+-r--r--r-- 1 mts mts 2638 Jun 21 00:01 suspend-vm-default
 
-open-vm-tools-2008.06.03-96374/scripts/linux/pam.d:
+open-vm-tools-2008.06.20-100027/scripts/linux/pam.d:
 total 8
--r--r--r-- 1 mts mts 266 Jun  3 01:06 vmware-guestd
--r--r--r-- 1 mts mts 274 Jun  3 01:06 vmware-guestd-x64
+-r--r--r-- 1 mts mts 266 Jun 21 00:01 vmware-guestd
+-r--r--r-- 1 mts mts 274 Jun 21 00:01 vmware-guestd-x64
 
-open-vm-tools-2008.06.03-96374/scripts/solaris:
+open-vm-tools-2008.06.20-100027/scripts/solaris:
 total 16
--r--r--r-- 1 mts mts 1354 Jun  3 01:06 poweroff-vm-default
--r--r--r-- 1 mts mts 1353 Jun  3 01:06 poweron-vm-default
--r--r--r-- 1 mts mts 1553 Jun  3 01:06 resume-vm-default
--r--r--r-- 1 mts mts 1904 Jun  3 01:06 suspend-vm-default
-
-open-vm-tools-2008.06.03-96374/toolbox:
-total 176
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  3319 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 18956 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  2696 Jun  3 01:06 bigIcon.xpm
--r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
--r--r--r-- 1 mts mts   458 Jun  3 01:06 smallIcon.xpm
--r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
--r--r--r-- 1 mts mts 29581 Jun  3 01:06 toolbox-gtk.c
--r--r--r-- 1 mts mts  6323 Jun  3 01:06 toolboxAbout.c
--r--r--r-- 1 mts mts  7085 Jun  3 01:06 toolboxDevices.c
--r--r--r-- 1 mts mts  2835 Jun  3 01:06 toolboxInt.h
--r--r--r-- 1 mts mts  3898 Jun  3 01:06 toolboxOptions.c
--r--r--r-- 1 mts mts 24460 Jun  3 01:06 toolboxScripts.c
--r--r--r-- 1 mts mts 14826 Jun  3 01:06 toolboxShrink.c
--r--r--r-- 1 mts mts  1557 Jun  3 01:06 toolboxgtk_version.h
-
-open-vm-tools-2008.06.03-96374/vmware-user:
-total 468
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  4127 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 20324 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts 65610 Jun  3 01:06 copyPaste.c
--r--r--r-- 1 mts mts  6142 Jun  3 01:06 debugStdio.c
--r--r--r-- 1 mts mts 83230 Jun  3 01:06 dnd.c
--r--r--r-- 1 mts mts 37366 Jun  3 01:06 foreignVMToolsDaemon.c
--r--r--r-- 1 mts mts  6210 Jun  3 01:06 foreignVMToolsDaemon.h
--r--r--r-- 1 mts mts 36992 Jun  3 01:06 foreignVMToolsNetworking.c
--r--r--r-- 1 mts mts 54676 Jun  3 01:06 foundryToolsDaemon.c
--r--r--r-- 1 mts mts  1766 Jun  3 01:06 foundryToolsDaemon.h
--r--r--r-- 1 mts mts  7478 Jun  3 01:06 libvmwarectrl.c
--r--r--r-- 1 mts mts  2031 Jun  3 01:06 libvmwarectrl.h
--r--r--r-- 1 mts mts  6157 Jun  3 01:06 pointer.c
--r--r--r-- 1 mts mts 16123 Jun  3 01:06 resolution.c
--r--r--r-- 1 mts mts  4731 Jun  3 01:06 stub.c
--r--r--r-- 1 mts mts 30550 Jun  3 01:06 vmware-user.c
--r--r--r-- 1 mts mts  1868 Jun  3 01:06 vmwarectrl.h
--r--r--r-- 1 mts mts  3636 Jun  3 01:06 vmwarectrlproto.h
--r--r--r-- 1 mts mts  2896 Jun  3 01:06 vmwareuserInt.h
--r--r--r-- 1 mts mts  1564 Jun  3 01:06 vmwareuser_version.h
-
-open-vm-tools-2008.06.03-96374/vmware-user-suid-wrapper:
+-r--r--r-- 1 mts mts 1354 Jun 21 00:01 poweroff-vm-default
+-r--r--r-- 1 mts mts 1353 Jun 21 00:01 poweron-vm-default
+-r--r--r-- 1 mts mts 1553 Jun 21 00:01 resume-vm-default
+-r--r--r-- 1 mts mts 1904 Jun 21 00:01 suspend-vm-default
+
+open-vm-tools-2008.06.20-100027/toolbox:
+total 168
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  3334 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 18948 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  2696 Jun 21 00:01 bigIcon.xpm
+-r--r--r-- 1 mts mts  6234 Jun 21 00:01 debugStdio.c
+-r--r--r-- 1 mts mts   458 Jun 21 00:01 smallIcon.xpm
+-r--r--r-- 1 mts mts 29195 Jun 21 00:01 toolbox-gtk.c
+-r--r--r-- 1 mts mts  6323 Jun 21 00:01 toolboxAbout.c
+-r--r--r-- 1 mts mts  7085 Jun 21 00:01 toolboxDevices.c
+-r--r--r-- 1 mts mts  2835 Jun 21 00:01 toolboxInt.h
+-r--r--r-- 1 mts mts  3898 Jun 21 00:01 toolboxOptions.c
+-r--r--r-- 1 mts mts 24567 Jun 21 00:01 toolboxScripts.c
+-r--r--r-- 1 mts mts 14555 Jun 21 00:01 toolboxShrink.c
+-r--r--r-- 1 mts mts  1557 Jun 21 00:01 toolboxgtk_version.h
+
+open-vm-tools-2008.06.20-100027/vmware-user:
+total 428
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  4289 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 20313 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts 66753 Jun 21 00:01 copyPaste.c
+-r--r--r-- 1 mts mts  6234 Jun 21 00:01 debugStdio.c
+-r--r--r-- 1 mts mts 84579 Jun 21 00:01 dnd.c
+-r--r--r-- 1 mts mts 37366 Jun 21 00:01 foreignVMToolsDaemon.c
+-r--r--r-- 1 mts mts  6210 Jun 21 00:01 foreignVMToolsDaemon.h
+-r--r--r-- 1 mts mts 36872 Jun 21 00:01 foreignVMToolsNetworking.c
+-r--r--r-- 1 mts mts 54650 Jun 21 00:01 foundryToolsDaemon.c
+-r--r--r-- 1 mts mts  1766 Jun 21 00:01 foundryToolsDaemon.h
+-r--r--r-- 1 mts mts  6157 Jun 21 00:01 pointer.c
+-r--r--r-- 1 mts mts 35397 Jun 21 00:01 vmware-user.c
+-r--r--r-- 1 mts mts  2822 Jun 21 00:01 vmwareuserInt.h
+-r--r--r-- 1 mts mts  1564 Jun 21 00:01 vmwareuser_version.h
+
+open-vm-tools-2008.06.20-100027/vmware-user-suid-wrapper:
 total 96
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1323 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 15320 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  4334 Jun  3 01:06 locationsdb.c
--r--r--r-- 1 mts mts 12200 Jun  3 01:06 main.c
--r--r--r-- 1 mts mts  7111 Jun  3 01:06 wrapper-freebsd.c
--r--r--r-- 1 mts mts  4046 Jun  3 01:06 wrapper-linux.c
--r--r--r-- 1 mts mts  5993 Jun  3 01:06 wrapper-solaris.c
--r--r--r-- 1 mts mts  2921 Jun  3 01:06 wrapper.h
--r--r--r-- 1 mts mts  1549 Jun  3 01:06 wrapper_version.h
-
-open-vm-tools-2008.06.03-96374/xferlogs:
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1323 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 15338 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  4334 Jun 21 00:01 locationsdb.c
+-r--r--r-- 1 mts mts 12200 Jun 21 00:01 main.c
+-r--r--r-- 1 mts mts  7111 Jun 21 00:01 wrapper-freebsd.c
+-r--r--r-- 1 mts mts  4046 Jun 21 00:01 wrapper-linux.c
+-r--r--r-- 1 mts mts  5993 Jun 21 00:01 wrapper-solaris.c
+-r--r--r-- 1 mts mts  2921 Jun 21 00:01 wrapper.h
+-r--r--r-- 1 mts mts  1549 Jun 21 00:01 wrapper_version.h
+
+open-vm-tools-2008.06.20-100027/xferlogs:
 total 68
--r--r--r-- 1 mts mts 26425 Jun  3 01:06 COPYING
--r--r--r-- 1 mts mts  1565 Jun  3 01:06 Makefile.am
--rw-r--r-- 1 mts mts 16453 Jun  3 01:06 Makefile.in
--r--r--r-- 1 mts mts  9301 Jun  3 01:06 xferlogs.c
--r--r--r-- 1 mts mts  1554 Jun  3 01:06 xferlogs_version.h
+-r--r--r-- 1 mts mts 26425 Jun 21 00:01 COPYING
+-r--r--r-- 1 mts mts  1565 Jun 21 00:01 Makefile.am
+-rw-r--r-- 1 mts mts 16471 Jun 21 00:01 Makefile.in
+-r--r--r-- 1 mts mts  9301 Jun 21 00:01 xferlogs.c
+-r--r--r-- 1 mts mts  1554 Jun 21 00:01 xferlogs_version.h
index 4998f39a8e244968e6ebe443ec642dfe9554cfe3..6626bf8a9a24640d2a479b1562c07ab390bfc13a 100755 (executable)
@@ -39,5 +39,7 @@ SUBDIRS += libguestlib
 SUBDIRS += xferlogs
 SUBDIRS += scripts
 if !SOLARIS
+if WITH_KERNEL_MODULES
 SUBDIRS += modules
 endif
+endif
index 5964c56420b4754ee1afcee3e2820948125cfc25..f2601f6394ea28ad048640448607319409952517 100644 (file)
@@ -53,7 +53,7 @@ build_triplet = @build@
 host_triplet = @host@
 @HAVE_X11_TRUE@am__append_1 = $(X11_SUBDIRS)
 @BUILD_HGFSMOUNTER_TRUE@am__append_2 = hgfsmounter
-@SOLARIS_FALSE@am__append_3 = modules
+@SOLARIS_FALSE@@WITH_KERNEL_MODULES_TRUE@am__append_3 = modules
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
@@ -169,6 +169,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 05835b42d14f2d9e4f22d6e5c21273df0a43cbbf..5adce8601fa5754f947a16d96b0919bc805bea73 100755 (executable)
@@ -1,3 +1,20 @@
+open-vm-tools 2008.06.18 changes:
+       * Fixed Sourceforge bug 1847750 (FreeBSD 7 & 8 builds) and Sourceforge
+       bug 1981632 (build failure on Solaris). This should get open-vm-tools
+       building and running on FreeBSD 7 & 8 and Solaris. Thanks to Martin
+       Blapp for all the FreeBSD patches, and Jonathan Keatley for reporting
+       the Solaris bug.
+
+       * Fixed Sourceforge bug 1968416 (packet counting in FreeBSD vmxnet).
+       Thanks to Shunsuke SHINOMIYA for reporting this bug.
+
+       * Fixed Sourceforge bug 1983375 (Cannot specify kernel constraints).
+       You can now pass --without-kernel-modules, --with-kernel-release, and
+       --with-linuxdir to the ./configure script. Thanks to Craig Phillips for
+       reporting this bug.
+
+       * Other bug fixes.
+
 open-vm-tools 2008.06.03 changes:
        * Added the vmware-user-suid-wrapper application, with implementations
        for Linux, FreeBSD, and Solaris. This app is needed to make correct use
index 2c6f280b7e001cc5610b016785fa0888089bc7a5..cb324ad821dbff19f2a657f8d895f08514cf4996 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 74442222d2f11f9677af2ba2d1008217d83c521b..0885dc037f287a31b1d526cefc8d7b59930d00ba 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for open-vm-tools 2008.06.03-96374.
+# Generated by GNU Autoconf 2.61 for open-vm-tools 2008.06.20-100027.
 #
 # Report bugs to <open-vm-tools-devel@lists.sourceforge.net>.
 #
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='open-vm-tools'
 PACKAGE_TARNAME='open-vm-tools'
-PACKAGE_VERSION='2008.06.03-96374'
-PACKAGE_STRING='open-vm-tools 2008.06.03-96374'
+PACKAGE_VERSION='2008.06.20-100027'
+PACKAGE_STRING='open-vm-tools 2008.06.20-100027'
 PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net'
 
 ac_unique_file="checkvm/checkvm.c"
@@ -879,6 +879,7 @@ X_LIBS
 X_EXTRA_LIBS
 DNET_CONFIG
 ICU_CONFIG
+RPCGEN
 BUILD_HGFSMOUNTER_TRUE
 BUILD_HGFSMOUNTER_FALSE
 LINUX_TRUE
@@ -893,6 +894,8 @@ HAVE_X11_TRUE
 HAVE_X11_FALSE
 NO_ICU_TRUE
 NO_ICU_FALSE
+WITH_KERNEL_MODULES_TRUE
+WITH_KERNEL_MODULES_FALSE
 PAMD_TRUE
 PAMD_FALSE
 TARGET_OS
@@ -1441,7 +1444,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures open-vm-tools 2008.06.03-96374 to adapt to many kinds of systems.
+\`configure' configures open-vm-tools 2008.06.20-100027 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1515,7 +1518,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of open-vm-tools 2008.06.03-96374:";;
+     short | recursive ) echo "Configuration of open-vm-tools 2008.06.20-100027:";;
    esac
   cat <<\_ACEOF
 
@@ -1534,6 +1537,10 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --without-kernel-modules
+                          Do not compile or install the kernel modules
+  --with-kernel-release   Specify the kernel release you want to build against
+  --with-linuxdir         Specify the Linux directory you want to use
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
@@ -1626,7 +1633,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-open-vm-tools configure 2008.06.03-96374
+open-vm-tools configure 2008.06.20-100027
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1640,7 +1647,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by open-vm-tools $as_me 2008.06.03-96374, which was
+It was created by open-vm-tools $as_me 2008.06.20-100027, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2191,11 +2198,41 @@ echo "$as_me: error: Unknown architecture." >&2;}
       ;;
 esac
 
+# Kernel args
+# The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible
+# to getOsVersion()
+
+# Check whether --with-kernel-modules was given.
+if test "${with_kernel_modules+set}" = set; then
+  withval=$with_kernel_modules;
+else
+  with_kernel_modules=yes
+fi
+
+
+
+# Check whether --with-kernel-release was given.
+if test "${with_kernel_release+set}" = set; then
+  withval=$with_kernel_release; KERNEL_RELEASE="$withval"
+else
+  KERNEL_RELEASE=`uname -r`
+fi
+
+
+
+# Check whether --with-linuxdir was given.
+if test "${with_linuxdir+set}" = set; then
+  withval=$with_linuxdir; LINUXDIR="$withval"
+else
+  LINUXDIR=/lib/modules/$KERNEL_RELEASE
+fi
+
+
 # Turn the uname output into something we can run comparisons on.
 getOsVersion() {
-   major_version="`uname -r | cut -f1 -d. | cut -f1 -d-`"
-   minor_version="`uname -r | cut -f2 -d. | cut -f1 -d-`"
-   micro_version="`uname -r | cut -f3 -d. | cut -f1 -d-`"
+   major_version="`echo $KERNEL_RELEASE | cut -f1 -d. | cut -f1 -d-`"
+   minor_version="`echo $KERNEL_RELEASE | cut -f2 -d. | cut -f1 -d-`"
+   micro_version="`echo $KERNEL_RELEASE | cut -f3 -d. | cut -f1 -d-`"
    printf '%02d%02d%03d' $major_version $minor_version $micro_version
 }
 
@@ -2215,6 +2252,15 @@ echo "$as_me: WARNING: This is an untested and unsupported Operating System. Pro
       ;;
 esac
 osVersion="`getOsVersion`"
+if test "$os" = "linux"; then
+   if test "$with_kernel_modules" = "yes"; then
+      if test ! -d "$LINUXDIR/kernel/"; then
+        { { echo "$as_me:$LINENO: error: $LINUXDIR/kernel does not exist" >&5
+echo "$as_me: error: $LINUXDIR/kernel does not exist" >&2;}
+   { (exit 1); exit 1; }; }
+      fi
+   fi
+fi
 
 # Check whether --enable-multimon was given.
 if test "${enable_multimon+set}" = set; then
@@ -2530,7 +2576,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='open-vm-tools'
- VERSION='2008.06.03-96374'
+ VERSION='2008.06.20-100027'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5596,7 +5642,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5599 "configure"' > conftest.$ac_ext
+  echo '#line 5645 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8097,11 +8143,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8100: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8146: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8104: \$? = $ac_status" >&5
+   echo "$as_me:8150: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8365,11 +8411,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8368: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8414: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8372: \$? = $ac_status" >&5
+   echo "$as_me:8418: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8469,11 +8515,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8472: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8518: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8476: \$? = $ac_status" >&5
+   echo "$as_me:8522: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9934,7 +9980,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9937 "configure"' > conftest.$ac_ext
+    echo '#line 9983 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10798,7 +10844,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10801 "configure"
+#line 10847 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10898,7 +10944,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10901 "configure"
+#line 10947 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13237,11 +13283,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13240: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13286: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13244: \$? = $ac_status" >&5
+   echo "$as_me:13290: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13341,11 +13387,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13344: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13390: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13348: \$? = $ac_status" >&5
+   echo "$as_me:13394: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13877,7 +13923,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13880 "configure"' > conftest.$ac_ext
+    echo '#line 13926 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14935,11 +14981,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14938: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14984: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14942: \$? = $ac_status" >&5
+   echo "$as_me:14988: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15039,11 +15085,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15042: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15088: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15046: \$? = $ac_status" >&5
+   echo "$as_me:15092: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16484,7 +16530,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16487 "configure"' > conftest.$ac_ext
+    echo '#line 16533 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17261,11 +17307,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17264: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17310: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17268: \$? = $ac_status" >&5
+   echo "$as_me:17314: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17529,11 +17575,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17532: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17578: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17536: \$? = $ac_status" >&5
+   echo "$as_me:17582: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17633,11 +17679,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17636: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17682: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17640: \$? = $ac_status" >&5
+   echo "$as_me:17686: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19098,7 +19144,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 19101 "configure"' > conftest.$ac_ext
+    echo '#line 19147 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -20322,6 +20368,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+if test "$ac_cv_prog_AR" = false; then
+   { { echo "$as_me:$LINENO: error: The 'ar' utility was not found. Please put ar on the path." >&5
+echo "$as_me: error: The 'ar' utility was not found. Please put ar on the path." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 # We use pkg-config to set up the cflags and libs for gtk.
 # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
@@ -21700,6 +21752,61 @@ else
    COMMON_XLIBS="-lX11"
    COMMON_XLIBS="-lXext $COMMON_XLIBS"
 
+   { echo "$as_me:$LINENO: checking for X11/extensions/extutil.h" >&5
+echo $ECHO_N "checking for X11/extensions/extutil.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_extensions_extutil_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+       #include <X11/Xproto.h>
+
+#include <X11/extensions/extutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_X11_extensions_extutil_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_X11_extensions_extutil_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_extutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_extensions_extutil_h" >&6; }
+if test $ac_cv_header_X11_extensions_extutil_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&5
+echo "$as_me: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
    if test "$MULTIMON_ENABLED" != "no"; then
       { echo "$as_me:$LINENO: checking for XineramaQueryVersion in -lXinerama" >&5
 echo $ECHO_N "checking for XineramaQueryVersion in -lXinerama... $ECHO_C" >&6; }
@@ -22634,6 +22741,7 @@ else
 fi
 
 
+if test "$os" = "linux"; then
 
 # Check whether --with-procps was given.
 if test "${with_procps+set}" = set; then
@@ -22642,6 +22750,9 @@ else
   with_procps=yes
 fi
 
+else
+       with_procps="no"
+fi
 
 if test "$with_procps" = "yes"; then
        ORIGINAL_LDFLAGS="$LDFLAGS"
@@ -23112,6 +23223,50 @@ echo "$as_me: error: icu-config was not found on your PATH. Please configure wit
        fi
 fi
 
+# Extract the first word of "rpcgen", so it can be a program name with args.
+set dummy rpcgen; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_RPCGEN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $RPCGEN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RPCGEN="$RPCGEN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RPCGEN="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_RPCGEN" && ac_cv_path_RPCGEN=" { { echo "$as_me:$LINENO: error: rpcgen not found. Please install the libc devel package." >&5
+echo "$as_me: error: rpcgen not found. Please install the libc devel package." >&2;}
+   { (exit 1); exit 1; }; } "
+  ;;
+esac
+fi
+RPCGEN=$ac_cv_path_RPCGEN
+if test -n "$RPCGEN"; then
+  { echo "$as_me:$LINENO: result: $RPCGEN" >&5
+echo "${ECHO_T}$RPCGEN" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
 ###
 ### Headers
 ###
@@ -26544,7 +26699,7 @@ MODULES_DIR=""
 buildHgfsmounter=no
 
 if test "$os" = "linux"; then
-   MODULES_DIR="/lib/modules/`uname -r`/kernel/"
+   MODULES_DIR="$LINUXDIR/kernel/"
 
    CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
    CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
@@ -26585,12 +26740,14 @@ if test "$os" = "solaris"; then
 
    GUESTD_LDADD="$GUESTD_LDADD -lsocket"
    GUESTD_LDADD="$GUESTD_LDADD -lnsl"
+   GUESTD_LDADD="$GUESTD_LDADD -lrpcsvc"
 
    VMWARE_USER_CPPFLAGS="$VMWARE_USER_CPPFLAGS -I/usr/X11/include/"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lXext"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lX11"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lsocket"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lnsl"
+   VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lrpcsvc"
 
    # uname -r on Solaris 10 reports "5.10"
    if test "$osVersion" -ge 510000; then
@@ -26654,6 +26811,14 @@ else
   NO_ICU_FALSE=
 fi
 
+ if test "$with_kernel_modules" = "yes"; then
+  WITH_KERNEL_MODULES_TRUE=
+  WITH_KERNEL_MODULES_FALSE='#'
+else
+  WITH_KERNEL_MODULES_TRUE='#'
+  WITH_KERNEL_MODULES_FALSE=
+fi
+
  if test -d /etc/pam.d; then
   PAMD_TRUE=
   PAMD_FALSE='#'
@@ -26740,7 +26905,7 @@ fi
 ###
 ### Create the Makefiles
 ###
-ac_config_files="$ac_config_files Makefile lib/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/backdoor/shared/Makefile lib/conf/Makefile lib/dict/Makefile lib/dnd/Makefile lib/err/Makefile lib/eventManager/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/ghIntegrationStub/Makefile lib/guestApp/Makefile lib/guestInfo/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/deployPkg/Makefile lib/impersonate/Makefile lib/message/Makefile lib/message/shared/Makefile lib/misc/Makefile lib/misc/shared/Makefile lib/netUtil/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcOut/shared/Makefile lib/rpcVmx/Makefile lib/SLPv2Parser/Makefile lib/socketMgr/Makefile lib/strUtil/Makefile lib/string/Makefile lib/string/shared/Makefile lib/sync/Makefile lib/sync/shared/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/toolsLogger/Makefile lib/unicode/Makefile lib/unityStub/Makefile lib/user/Makefile lib/vixTools/Makefile lib/vmBackupLib/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile guestd/Makefile vmware-user/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile libguestlib/Makefile xferlogs/Makefile modules/Makefile scripts/Makefile"
+ac_config_files="$ac_config_files Makefile lib/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/backdoor/shared/Makefile lib/conf/Makefile lib/dict/Makefile lib/dnd/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/eventManager/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/ghIntegrationStub/Makefile lib/guestApp/Makefile lib/guestInfo/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/deployPkg/Makefile lib/impersonate/Makefile lib/message/Makefile lib/message/shared/Makefile lib/misc/Makefile lib/misc/shared/Makefile lib/netUtil/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/printer/Makefile lib/procMgr/Makefile lib/resolution/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcOut/shared/Makefile lib/rpcVmx/Makefile lib/SLPv2Parser/Makefile lib/socketMgr/Makefile lib/strUtil/Makefile lib/string/Makefile lib/string/shared/Makefile lib/stubs/Makefile lib/stubs/shared/Makefile lib/sync/Makefile lib/sync/shared/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/toolsLogger/Makefile lib/unicode/Makefile lib/unityStub/Makefile lib/user/Makefile lib/vixTools/Makefile lib/vmBackupLib/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile guestd/Makefile vmware-user/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile libguestlib/Makefile xferlogs/Makefile modules/Makefile scripts/Makefile"
 
 
 ###
@@ -26949,6 +27114,13 @@ echo "$as_me: error: conditional \"NO_ICU\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${WITH_KERNEL_MODULES_TRUE}" && test -z "${WITH_KERNEL_MODULES_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_KERNEL_MODULES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_KERNEL_MODULES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${PAMD_TRUE}" && test -z "${PAMD_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"PAMD\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -27256,7 +27428,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by open-vm-tools $as_me 2008.06.03-96374, which was
+This file was extended by open-vm-tools $as_me 2008.06.20-100027, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27303,7 +27475,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-open-vm-tools config.status 2008.06.03-96374
+open-vm-tools config.status 2008.06.20-100027
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -27417,6 +27589,7 @@ do
     "lib/conf/Makefile") CONFIG_FILES="$CONFIG_FILES lib/conf/Makefile" ;;
     "lib/dict/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dict/Makefile" ;;
     "lib/dnd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dnd/Makefile" ;;
+    "lib/dynxdr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dynxdr/Makefile" ;;
     "lib/err/Makefile") CONFIG_FILES="$CONFIG_FILES lib/err/Makefile" ;;
     "lib/eventManager/Makefile") CONFIG_FILES="$CONFIG_FILES lib/eventManager/Makefile" ;;
     "lib/file/Makefile") CONFIG_FILES="$CONFIG_FILES lib/file/Makefile" ;;
@@ -27424,6 +27597,7 @@ do
     "lib/ghIntegrationStub/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ghIntegrationStub/Makefile" ;;
     "lib/guestApp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestApp/Makefile" ;;
     "lib/guestInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestInfo/Makefile" ;;
+    "lib/guestRpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestRpc/Makefile" ;;
     "lib/hgfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfs/Makefile" ;;
     "lib/hgfsBd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsBd/Makefile" ;;
     "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;;
@@ -27440,6 +27614,7 @@ do
     "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;;
     "lib/printer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/printer/Makefile" ;;
     "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;;
+    "lib/resolution/Makefile") CONFIG_FILES="$CONFIG_FILES lib/resolution/Makefile" ;;
     "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;;
     "lib/rpcOut/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcOut/Makefile" ;;
     "lib/rpcOut/shared/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcOut/shared/Makefile" ;;
@@ -27449,6 +27624,8 @@ do
     "lib/strUtil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/strUtil/Makefile" ;;
     "lib/string/Makefile") CONFIG_FILES="$CONFIG_FILES lib/string/Makefile" ;;
     "lib/string/shared/Makefile") CONFIG_FILES="$CONFIG_FILES lib/string/shared/Makefile" ;;
+    "lib/stubs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/stubs/Makefile" ;;
+    "lib/stubs/shared/Makefile") CONFIG_FILES="$CONFIG_FILES lib/stubs/shared/Makefile" ;;
     "lib/sync/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sync/Makefile" ;;
     "lib/sync/shared/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sync/shared/Makefile" ;;
     "lib/syncDriver/Makefile") CONFIG_FILES="$CONFIG_FILES lib/syncDriver/Makefile" ;;
@@ -27685,6 +27862,7 @@ X_LIBS!$X_LIBS$ac_delim
 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
 DNET_CONFIG!$DNET_CONFIG$ac_delim
 ICU_CONFIG!$ICU_CONFIG$ac_delim
+RPCGEN!$RPCGEN$ac_delim
 BUILD_HGFSMOUNTER_TRUE!$BUILD_HGFSMOUNTER_TRUE$ac_delim
 BUILD_HGFSMOUNTER_FALSE!$BUILD_HGFSMOUNTER_FALSE$ac_delim
 LINUX_TRUE!$LINUX_TRUE$ac_delim
@@ -27699,6 +27877,8 @@ HAVE_X11_TRUE!$HAVE_X11_TRUE$ac_delim
 HAVE_X11_FALSE!$HAVE_X11_FALSE$ac_delim
 NO_ICU_TRUE!$NO_ICU_TRUE$ac_delim
 NO_ICU_FALSE!$NO_ICU_FALSE$ac_delim
+WITH_KERNEL_MODULES_TRUE!$WITH_KERNEL_MODULES_TRUE$ac_delim
+WITH_KERNEL_MODULES_FALSE!$WITH_KERNEL_MODULES_FALSE$ac_delim
 PAMD_TRUE!$PAMD_TRUE$ac_delim
 PAMD_FALSE!$PAMD_FALSE$ac_delim
 TARGET_OS!$TARGET_OS$ac_delim
@@ -27730,7 +27910,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 59; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 4b599462bb8eca6dd99009114368973bf9fb764e..24eb2e9d5554ea4c3c18b6b43aa651dab5470ce1 100755 (executable)
@@ -34,7 +34,7 @@
 
 AC_INIT(
    [open-vm-tools],
-   [2008.06.03-96374],
+   [2008.06.20-100027],
    [open-vm-tools-devel@lists.sourceforge.net])
 
 # In order to make this configure script auto-detect situations where
@@ -74,11 +74,32 @@ case "$host_cpu" in
       ;;
 esac
 
+# Kernel args
+# The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible
+# to getOsVersion()
+AC_ARG_WITH([kernel-modules],
+           [AS_HELP_STRING([--without-kernel-modules],
+               [Do not compile or install the kernel modules])],
+           [],
+           [with_kernel_modules=yes])
+
+AC_ARG_WITH([kernel-release],
+           [AS_HELP_STRING([--with-kernel-release],
+               [Specify the kernel release you want to build against])],
+           [KERNEL_RELEASE="$withval"],
+           [KERNEL_RELEASE=`uname -r`])
+
+AC_ARG_WITH([linuxdir],
+           [AS_HELP_STRING([--with-linuxdir],
+               [Specify the Linux directory you want to use])],
+           [LINUXDIR="$withval"],
+           [LINUXDIR=/lib/modules/$KERNEL_RELEASE])
+
 # Turn the uname output into something we can run comparisons on.
 getOsVersion() {
-   major_version="`uname -r | cut -f1 -d. | cut -f1 -d-`"
-   minor_version="`uname -r | cut -f2 -d. | cut -f1 -d-`"
-   micro_version="`uname -r | cut -f3 -d. | cut -f1 -d-`"
+   major_version="`echo $KERNEL_RELEASE | cut -f1 -d. | cut -f1 -d-`"
+   minor_version="`echo $KERNEL_RELEASE | cut -f2 -d. | cut -f1 -d-`"
+   micro_version="`echo $KERNEL_RELEASE | cut -f3 -d. | cut -f1 -d-`"
    printf '%02d%02d%03d' $major_version $minor_version $micro_version
 }
 
@@ -97,6 +118,13 @@ case "$host_os" in
       ;;
 esac
 osVersion="`getOsVersion`"
+if test "$os" = "linux"; then
+   if test "$with_kernel_modules" = "yes"; then
+      if test ! -d "$LINUXDIR/kernel/"; then
+        AC_MSG_ERROR([$LINUXDIR/kernel does not exist])
+      fi
+   fi
+fi
 
 AC_ARG_ENABLE(
    multimon,
@@ -133,6 +161,10 @@ AC_PROG_CC
 AC_PROG_INSTALL
 # Needed for creating the archives in lib/ and the shared libraries.
 AC_PROG_LIBTOOL
+if test "$ac_cv_prog_AR" = false; then
+   AC_MSG_ERROR([The 'ar' utility was not found. Please put ar on the path.])
+fi
+
 # We use pkg-config to set up the cflags and libs for gtk.
 AC_CHECK_PROG(
    [HAVE_PKG_CONFIG],
@@ -162,6 +194,14 @@ else
    COMMON_XLIBS="-lX11"
    COMMON_XLIBS="-lXext $COMMON_XLIBS"
 
+   AC_CHECK_HEADER(
+      [X11/extensions/extutil.h],
+      [],
+      [AC_MSG_ERROR(
+         [X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])],
+      [#include <X11/Xlib.h>
+       #include <X11/Xproto.h>])
+
    if test "$MULTIMON_ENABLED" != "no"; then
       AC_CHECK_LIB(
         [Xinerama],
@@ -308,11 +348,15 @@ AC_ARG_WITH([pam-prefix],
            [PAM_PREFIX="$withval"],
            [PAM_PREFIX='$(sysconfdir)'])
 
-AC_ARG_WITH([procps],
+if test "$os" = "linux"; then
+        AC_ARG_WITH([procps],
            [AS_HELP_STRING([--without-procps],
-              [compile without libproc (disables support for meminfo)])],
+               [compile without libproc (disables support for meminfo)])],
            [],
            [with_procps=yes])
+else
+       with_procps="no"
+fi
 
 if test "$with_procps" = "yes"; then
        ORIGINAL_LDFLAGS="$LDFLAGS"
@@ -427,6 +471,11 @@ if test "$with_icu" = "yes"; then
        fi
 fi
 
+AC_PATH_PROG(
+   [RPCGEN],
+   [rpcgen],
+   [ AC_MSG_ERROR([rpcgen not found. Please install the libc devel package.]) ])
+
 ###
 ### Headers
 ###
@@ -585,7 +634,7 @@ MODULES_DIR=""
 buildHgfsmounter=no
 
 if test "$os" = "linux"; then
-   MODULES_DIR="/lib/modules/`uname -r`/kernel/"
+   MODULES_DIR="$LINUXDIR/kernel/"
 
    CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
    CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
@@ -626,12 +675,14 @@ if test "$os" = "solaris"; then
 
    GUESTD_LDADD="$GUESTD_LDADD -lsocket"
    GUESTD_LDADD="$GUESTD_LDADD -lnsl"
+   GUESTD_LDADD="$GUESTD_LDADD -lrpcsvc"
 
    VMWARE_USER_CPPFLAGS="$VMWARE_USER_CPPFLAGS -I/usr/X11/include/"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lXext"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lX11"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lsocket"
    VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lnsl"
+   VMWARE_USER_LDADD="$VMWARE_USER_LDADD -lrpcsvc"
 
    # uname -r on Solaris 10 reports "5.10"
    if test "$osVersion" -ge 510000; then
@@ -646,6 +697,7 @@ AM_CONDITIONAL(FREEBSD, test "$os" = "freebsd")
 AM_CONDITIONAL(THIRTY_TWO_BIT_USERSPACE, test "$userSpaceBitness" = "32")
 AM_CONDITIONAL(HAVE_X11, test "$have_x" = "yes")
 AM_CONDITIONAL(NO_ICU, test "$with_icu" = "yes")
+AM_CONDITIONAL(WITH_KERNEL_MODULES, test "$with_kernel_modules" = "yes")
 AM_CONDITIONAL(PAMD, test -d /etc/pam.d)
 
 ### Feature-specific flags / actions
@@ -730,6 +782,7 @@ AC_CONFIG_FILES([                      \
    lib/conf/Makefile                   \
    lib/dict/Makefile                   \
    lib/dnd/Makefile                    \
+   lib/dynxdr/Makefile                 \
    lib/err/Makefile                    \
    lib/eventManager/Makefile           \
    lib/file/Makefile                   \
@@ -737,6 +790,7 @@ AC_CONFIG_FILES([                      \
    lib/ghIntegrationStub/Makefile      \
    lib/guestApp/Makefile               \
    lib/guestInfo/Makefile              \
+   lib/guestRpc/Makefile               \
    lib/hgfs/Makefile                   \
    lib/hgfsBd/Makefile                 \
    lib/hgfsServer/Makefile             \
@@ -753,6 +807,7 @@ AC_CONFIG_FILES([                      \
    lib/panicDefault/Makefile           \
    lib/printer/Makefile                \
    lib/procMgr/Makefile                \
+   lib/resolution/Makefile             \
    lib/rpcIn/Makefile                  \
    lib/rpcOut/Makefile                 \
    lib/rpcOut/shared/Makefile          \
@@ -762,6 +817,8 @@ AC_CONFIG_FILES([                      \
    lib/strUtil/Makefile                \
    lib/string/Makefile                 \
    lib/string/shared/Makefile          \
+   lib/stubs/Makefile                  \
+   lib/stubs/shared/Makefile           \
    lib/sync/Makefile                   \
    lib/sync/shared/Makefile            \
    lib/syncDriver/Makefile             \
index b08f7c70f29027ffc39ff7fda82bd1e34581b06d..68e55bb45783f643154ba08fc6f37804017e0a87 100644 (file)
@@ -18,6 +18,8 @@
 sbin_PROGRAMS = vmware-guestd
 pamdir = $(PAM_PREFIX)/pam.d
 
+AM_CFLAGS = -I$(top_builddir)/include
+
 vmware_guestd_LDADD =
 vmware_guestd_LDADD += ../lib/backdoor/libBackdoor.a
 vmware_guestd_LDADD += ../lib/conf/libConf.a
@@ -27,6 +29,7 @@ vmware_guestd_LDADD += ../lib/eventManager/libEventManager.a
 vmware_guestd_LDADD += ../lib/file/libFile.a
 vmware_guestd_LDADD += ../lib/guestApp/libGuestApp.a
 vmware_guestd_LDADD += ../lib/guestInfo/libGuestInfo.a
+vmware_guestd_LDADD += ../lib/guestRpc/libGuestRpc.a
 vmware_guestd_LDADD += ../lib/hgfsServer/libHgfsServer.a
 vmware_guestd_LDADD += ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a
 vmware_guestd_LDADD += ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a
@@ -55,6 +58,7 @@ vmware_guestd_LDADD += ../lib/wiper/libWiper.a
 # can't be put in LDADD), we need to bring the following libraries out of the
 # alphabetical order so their symbols are properly resolved.
 vmware_guestd_LDADD += ../lib/dict/libDict.a
+vmware_guestd_LDADD += ../lib/dynxdr/libDynxdr.a
 vmware_guestd_LDADD += ../lib/hgfs/libHgfs.a
 vmware_guestd_LDADD += ../lib/message/libMessage.a
 vmware_guestd_LDADD += ../lib/unicode/libUnicode.a
@@ -63,6 +67,7 @@ vmware_guestd_LDADD += ../lib/foundryMsg/libFoundryMsg.a
 vmware_guestd_LDADD += ../lib/auth/libAuth.a
 vmware_guestd_LDADD += ../lib/panicDefault/libPanicDefault.a
 vmware_guestd_LDADD += ../lib/panic/libPanic.a
+vmware_guestd_LDADD += ../lib/stubs/libStubs.a
 if SOLARIS
    HGFS_BD = ../lib/hgfsBd/libHgfsBd.a
 else
@@ -78,7 +83,6 @@ vmware_guestd_SOURCES += foreignVMToolsDaemon.c
 vmware_guestd_SOURCES += foreignVMToolsNetworking.c
 vmware_guestd_SOURCES += foundryToolsDaemon.c
 vmware_guestd_SOURCES += main.c
-vmware_guestd_SOURCES += stub.c
 vmware_guestd_SOURCES += toolsDaemon.c
 
 if LINUX
index 65fbd3b76d7ab5006c8cf49f78a36f670f4da91d..b23b2cfb478e388d59778daaba3559aaf80d5fb1 100644 (file)
@@ -65,7 +65,7 @@ PROGRAMS = $(sbin_PROGRAMS)
 am_vmware_guestd_OBJECTS = debugStdio.$(OBJEXT) \
        foreignVMToolsDaemon.$(OBJEXT) \
        foreignVMToolsNetworking.$(OBJEXT) \
-       foundryToolsDaemon.$(OBJEXT) main.$(OBJEXT) stub.$(OBJEXT) \
+       foundryToolsDaemon.$(OBJEXT) main.$(OBJEXT) \
        toolsDaemon.$(OBJEXT)
 vmware_guestd_OBJECTS = $(am_vmware_guestd_OBJECTS)
 @SOLARIS_TRUE@am__DEPENDENCIES_1 = ../lib/hgfsBd/libHgfsBd.a
@@ -73,6 +73,7 @@ vmware_guestd_DEPENDENCIES = ../lib/backdoor/libBackdoor.a \
        ../lib/conf/libConf.a ../lib/dnd/libDnd.a ../lib/err/libErr.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
+       ../lib/guestRpc/libGuestRpc.a \
        ../lib/hgfsServer/libHgfsServer.a \
        ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a \
        ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a \
@@ -89,10 +90,11 @@ vmware_guestd_DEPENDENCIES = ../lib/backdoor/libBackdoor.a \
        ../lib/vmBackupLib/libVmBackupLib.a \
        ../lib/vmCheck/libVmCheck.a ../lib/vmSignal/libVmSignal.a \
        ../lib/wiper/libWiper.a ../lib/dict/libDict.a \
-       ../lib/hgfs/libHgfs.a ../lib/message/libMessage.a \
-       ../lib/unicode/libUnicode.a ../lib/misc/libMisc.a \
-       ../lib/foundryMsg/libFoundryMsg.a ../lib/auth/libAuth.a \
-       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
+       ../lib/dynxdr/libDynxdr.a ../lib/hgfs/libHgfs.a \
+       ../lib/message/libMessage.a ../lib/unicode/libUnicode.a \
+       ../lib/misc/libMisc.a ../lib/foundryMsg/libFoundryMsg.a \
+       ../lib/auth/libAuth.a ../lib/panicDefault/libPanicDefault.a \
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a \
        $(am__DEPENDENCIES_1)
 pamSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(pam_SCRIPTS)
@@ -188,6 +190,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -253,6 +256,7 @@ target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 pamdir = $(PAM_PREFIX)/pam.d
+AM_CFLAGS = -I$(top_builddir)/include
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of the
 # alphabetical order so their symbols are properly resolved.
@@ -260,6 +264,7 @@ vmware_guestd_LDADD = ../lib/backdoor/libBackdoor.a \
        ../lib/conf/libConf.a ../lib/dnd/libDnd.a ../lib/err/libErr.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
+       ../lib/guestRpc/libGuestRpc.a \
        ../lib/hgfsServer/libHgfsServer.a \
        ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a \
        ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a \
@@ -276,15 +281,16 @@ vmware_guestd_LDADD = ../lib/backdoor/libBackdoor.a \
        ../lib/vmBackupLib/libVmBackupLib.a \
        ../lib/vmCheck/libVmCheck.a ../lib/vmSignal/libVmSignal.a \
        ../lib/wiper/libWiper.a ../lib/dict/libDict.a \
-       ../lib/hgfs/libHgfs.a ../lib/message/libMessage.a \
-       ../lib/unicode/libUnicode.a ../lib/misc/libMisc.a \
-       ../lib/foundryMsg/libFoundryMsg.a ../lib/auth/libAuth.a \
-       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
-       $(HGFS_BD) @ICU_LIBS@ @GUESTD_LDADD@
+       ../lib/dynxdr/libDynxdr.a ../lib/hgfs/libHgfs.a \
+       ../lib/message/libMessage.a ../lib/unicode/libUnicode.a \
+       ../lib/misc/libMisc.a ../lib/foundryMsg/libFoundryMsg.a \
+       ../lib/auth/libAuth.a ../lib/panicDefault/libPanicDefault.a \
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a $(HGFS_BD) \
+       @ICU_LIBS@ @GUESTD_LDADD@ $(am__empty)
 @SOLARIS_FALSE@HGFS_BD = 
 @SOLARIS_TRUE@HGFS_BD = ../lib/hgfsBd/libHgfsBd.a
 vmware_guestd_SOURCES = debugStdio.c foreignVMToolsDaemon.c \
-       foreignVMToolsNetworking.c foundryToolsDaemon.c main.c stub.c \
+       foreignVMToolsNetworking.c foundryToolsDaemon.c main.c \
        toolsDaemon.c
 @LINUX_TRUE@@PAMD_TRUE@@THIRTY_TWO_BIT_USERSPACE_FALSE@pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd-x64
 @LINUX_TRUE@@PAMD_TRUE@@THIRTY_TWO_BIT_USERSPACE_TRUE@pam_SCRIPTS = ../scripts/linux/pam.d/vmware-guestd
@@ -383,7 +389,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foreignVMToolsNetworking.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryToolsDaemon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolsDaemon.Po@am__quote@
 
 .c.o:
index b1774810323960b797a1ebe0ac8fb328be40b2ab..05dcc7785c1d95e84d633f1348301201720e7b2f 100644 (file)
@@ -167,6 +167,7 @@ void DebugToFile(const char *str) // IN
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
+   char debugFileShadow;
 
    ASSERT(debugFile[0] != 0);
 
@@ -174,8 +175,9 @@ void DebugToFile(const char *str) // IN
 
    fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
+   debugFileShadow = debugFile[0];
+   debugFile[0] = '\0';
    if (fr != FILEIO_SUCCESS) {
-      debugFile[0] = '\0';
       Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
@@ -205,6 +207,7 @@ void DebugToFile(const char *str) // IN
    FileIO_Close(&fd);
 
  done:
+   debugFile[0] = debugFileShadow;
    return;
 #endif // _CONSOLE
 }
index 0b2848659c0813444b3aad3af1643e62bf5eb1b9..e32c72facdd3ba5de301100434be6efdcdc4087b 100644 (file)
@@ -48,7 +48,7 @@
 #include "SLPv2Private.h"
 #include "guestInfo.h"
 #include "netutil.h"
-#include "guestInfoInt.h"
+#include "guestInfo.h"
 
 #include "vixOpenSource.h"
 #include "syncEvent.h"
@@ -57,7 +57,6 @@
 #include "foreignVMToolsDaemon.h"
 
 
-
 #ifdef _WIN32
 #define ASOCK_ENOTCONN          WSAENOTCONN
 #define ASOCK_ENOTSOCK          WSAENOTSOCK
@@ -265,7 +264,7 @@ ForeignTools_InitializeNetworking(void)
    char *ipAddressStr = NULL;
    char *destPtr;
    char *endDestPtr;
-   GuestNicInfo nicInfo;
+   GuestNicList nicInfo;
 #ifdef _WIN32
    HMODULE hWs2_32 = NULL;
    WSADATA wsaData;
@@ -414,21 +413,18 @@ ForeignTools_InitializeNetworking(void)
    /*
     * Find out how big the IP_ADAPTER_INFO table needs to be.
     */
-   success = GuestInfoGetNicInfo(&nicInfo);
+   success = GuestInfo_GetNicInfo(&nicInfo);
    if (success) {
-      NicEntry *nicEntryPtr = NULL;
-      DblLnkLst_Links *nicEntryLink;
-
-      DblLnkLst_ForEach(nicEntryLink, &nicInfo.nicList) {
-         nicEntryPtr = DblLnkLst_Container(nicEntryLink, NicEntry, links);
+      u_int i;
+      for (i = 0; i < nicInfo.nics.nics_len; i++) {
+         GuestNic *nic = &nicInfo.nics.nics_val[i];
          destPtr += Str_Snprintf(destPtr,
                                  endDestPtr - destPtr,
                                  "%s=%s;",
                                  VIX_SLPV2_PROPERTY_MAC_ADDR,
-                                 nicEntryPtr->nicEntryProto.macAddress);
+                                 nic->macAddress);
       }
-
-      GuestInfo_FreeDynamicMemoryInNicInfo(&nicInfo);
+      VMX_XDR_FREE(xdr_GuestNicList, &nicInfo);
    }
 
    free(ipAddressStr);
index fc83697efa33fe9e5015ca1c2f87edaaad63f4e9..7d2ccd537d64267cc0e8b4366fa61579016eb2ca 100644 (file)
@@ -65,7 +65,6 @@
 #include "foundryToolsDaemon.h"
 #include "printer.h"
 #include "base64.h"
-#include "guestInfoInt.h"
 #include "syncDriver.h"
 #include "hgfsServer.h"
 #include "hgfs.h"
index 546f85b7e79b25de3f9b0eb03e3dcaa9f8fc73a4..d212e5eec99c6a4c48a463e1baa536e51bce52a8 100644 (file)
@@ -1132,14 +1132,14 @@ out:
 #elif defined(VM_GUESTD_MOUNTS_HGFS)
    HgfsMountState_Cleanup(&globalHgfsState);
 #endif
-   if (data) {
-      ToolsDaemon_Cleanup(data);
-   }
-
    if (syncProvider != NULL) {
       VmBackup_Shutdown(data->in);
    }
 
+   if (data) {
+      ToolsDaemon_Cleanup(data);
+   }
+
    return *gDaemonSignalPtr == SIGTERM ? TRUE : FALSE;
 }
 
index c843660f115e023717e3c8b2e1a029d0dcb79704..1a93d4e4eb3cdb330d0931524bdb1e2f0fc0b5f4 100644 (file)
@@ -708,12 +708,7 @@ ToolsDaemonResetSent(void *clientData) // IN
  */
 
 static Bool
-ToolsDaemonTcloReset(char const **result,     // OUT
-                     size_t *resultLen,       // OUT
-                     const char *name,        // IN
-                     const char *args,        // IN
-                     size_t argsSize,         // Ignored
-                     void *clientData)        // Ignored
+ToolsDaemonTcloReset(RpcInData *data)  // IN/OUT
 {
    /*
     * Mandatory reset RPC
@@ -727,10 +722,9 @@ ToolsDaemonTcloReset(char const **result,     // OUT
     * reinitialize the channel if appropriate. [greg]
     */
    EventManager_Add(ToolsDaemonEventQueue, (int) (RPCIN_POLL_TIME * 1.5),
-                    ToolsDaemonResetSent, clientData);
+                    ToolsDaemonResetSent, data->clientData);
 
-   return RpcIn_SetRetVals(result, resultLen, "ATR " TOOLS_DAEMON_NAME,
-                           TRUE);
+   return RPCIN_SETRETVALS(data, "ATR " TOOLS_DAEMON_NAME, TRUE);
 }
 
 
@@ -930,11 +924,13 @@ ToolsDaemonTcloCapReg(char const **result,     // OUT
 #ifdef _WIN32
    unsigned int minResolutionWidth;
    unsigned int minResolutionHeight;
+#endif
    ToolsDaemon_Data *data;
 
    data = (ToolsDaemon_Data *)clientData;
    ASSERT(data);
 
+#ifdef _WIN32
    /*
     * Inform the VMX that we support setting the guest
     * resolution and display topology. Currently, this only
@@ -1045,7 +1041,15 @@ ToolsDaemonTcloCapReg(char const **result,     // OUT
    }
 #endif
 
-   if (!GuestApp_SetVersion()) {
+   /*
+    * Send the monolithic Tools version. Using a configuration option, users
+    * can override the Tools version such that the VMX treats the Tools as not
+    * to be managed by the VMware platform.
+    */
+   if (!RpcOut_sendOne(NULL, NULL, "tools.set.version %u",
+                       GuestApp_GetDictEntryBool(*data->pConfDict,
+                                                 CONFNAME_DISABLETOOLSVERSION) ?
+                       TOOLS_VERSION_UNMANAGED : TOOLS_VERSION_CURRENT)) {
       Debug("Daemon: Error setting tools version during 'Capabilities_Register'"
             "request.\n");
    }
index 52f3b1c42440324d0f20855cc483ab32f1e4cd0a..2632d9d0d6d3a723f1b620c3c36ec48ee4a7eec5 100644 (file)
@@ -40,8 +40,9 @@ vmware_hgfsclient_LDADD += ../lib/rpcVmx/libRpcVmx.a
 vmware_hgfsclient_LDADD += ../lib/unicode/libUnicode.a
 vmware_hgfsclient_LDADD += ../lib/sync/libSync.a
 vmware_hgfsclient_LDADD += ../lib/misc/libMisc.a
+vmware_hgfsclient_LDADD += ../lib/stubs/libStubs.a
 vmware_hgfsclient_LDADD += @ICU_LIBS@
 
 vmware_hgfsclient_SOURCES =
 vmware_hgfsclient_SOURCES += hgfsclient.c
-vmware_hgfsclient_SOURCES += stub.c
+vmware_hgfsclient_SOURCES += stub-user-util.c
index f7f398fcb84b7153fb59db85133256b531c5c326..d7e218345318a9d32d95f26b4b58985dc8d66f43 100644 (file)
@@ -61,7 +61,8 @@ CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am_vmware_hgfsclient_OBJECTS = hgfsclient.$(OBJEXT) stub.$(OBJEXT)
+am_vmware_hgfsclient_OBJECTS = hgfsclient.$(OBJEXT) \
+       stub-user-util.$(OBJEXT)
 vmware_hgfsclient_OBJECTS = $(am_vmware_hgfsclient_OBJECTS)
 vmware_hgfsclient_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/guestApp/libGuestApp.a ../lib/hgfs/libHgfs.a \
@@ -73,7 +74,7 @@ vmware_hgfsclient_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/err/libErr.a ../lib/file/libFile.a \
        ../lib/message/libMessage.a ../lib/rpcVmx/libRpcVmx.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
-       ../lib/misc/libMisc.a
+       ../lib/misc/libMisc.a ../lib/stubs/libStubs.a
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -166,6 +167,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -243,8 +245,8 @@ vmware_hgfsclient_LDADD = ../lib/conf/libConf.a \
        ../lib/err/libErr.a ../lib/file/libFile.a \
        ../lib/message/libMessage.a ../lib/rpcVmx/libRpcVmx.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
-       ../lib/misc/libMisc.a @ICU_LIBS@
-vmware_hgfsclient_SOURCES = hgfsclient.c stub.c
+       ../lib/misc/libMisc.a ../lib/stubs/libStubs.a @ICU_LIBS@
+vmware_hgfsclient_SOURCES = hgfsclient.c stub-user-util.c
 all: all-am
 
 .SUFFIXES:
@@ -317,7 +319,7 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsclient.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-util.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/open-vm-tools/hgfsclient/stub-user-util.c b/open-vm-tools/hgfsclient/stub-user-util.c
new file mode 100644 (file)
index 0000000..76fddd7
--- /dev/null
@@ -0,0 +1,57 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-user-util.c --
+ *
+ *   Stubs for Util_* functions in lib/user.
+ *
+ */
+
+#if defined(_WIN32)
+#  include <windows.h>
+#endif
+
+#include <stdlib.h>
+#include "vm_assert.h"
+#include "util.h"
+
+void
+Util_Backtrace(int bugNr)
+{
+   NOT_IMPLEMENTED();
+}
+
+
+void
+Util_ExitProcessAbruptly(int code) // IN
+{
+#if defined(_WIN32)
+   TerminateProcess(GetCurrentProcess(),code);
+#else
+   exit(code);
+#endif
+}
+
+
+char *
+Util_ExpandString(const char *fileName)
+{
+   NOT_IMPLEMENTED();
+}
+
index e1e98f8d6e40a9f89013f5904ebb3814c7a3ff06..83dc90aeca297922eefd5cfbaeb0ef4cc468d859 100644 (file)
@@ -20,10 +20,13 @@ sbin_PROGRAMS = mount.vmhgfs
 mount_vmhgfs_LDADD =
 mount_vmhgfs_LDADD += ../lib/string/libString.a
 mount_vmhgfs_LDADD += ../lib/strUtil/libStrUtil.a
+mount_vmhgfs_LDADD += ../lib/panicDefault/libPanicDefault.a
+mount_vmhgfs_LDADD += ../lib/panic/libPanic.a
+mount_vmhgfs_LDADD += ../lib/stubs/libStubs.a
 
 mount_vmhgfs_SOURCES =
 mount_vmhgfs_SOURCES += hgfsmounter.c
-mount_vmhgfs_SOURCES += stub.c
+mount_vmhgfs_SOURCES += stub-user-util.c
 
 if FREEBSD
 install-exec-hook:
index 9ac14789caab74438aa05f3824eb8c5b253bd28e..cb61a17732a208359dc0ab6aa7f855515a7bb64b 100644 (file)
@@ -61,10 +61,13 @@ CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(sbindir)"
 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(sbin_PROGRAMS)
-am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) stub.$(OBJEXT)
+am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) \
+       stub-user-util.$(OBJEXT)
 mount_vmhgfs_OBJECTS = $(am_mount_vmhgfs_OBJECTS)
 mount_vmhgfs_DEPENDENCIES = ../lib/string/libString.a \
-       ../lib/strUtil/libStrUtil.a
+       ../lib/strUtil/libStrUtil.a \
+       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
+       ../lib/stubs/libStubs.a
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -157,6 +160,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -222,8 +226,10 @@ target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 mount_vmhgfs_LDADD = ../lib/string/libString.a \
-       ../lib/strUtil/libStrUtil.a
-mount_vmhgfs_SOURCES = hgfsmounter.c stub.c
+       ../lib/strUtil/libStrUtil.a \
+       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
+       ../lib/stubs/libStubs.a
+mount_vmhgfs_SOURCES = hgfsmounter.c stub-user-util.c
 all: all-am
 
 .SUFFIXES:
@@ -296,7 +302,7 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsmounter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-util.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
index 3a0c27fb98c77799afbec41330e3f3e18119965e..7cc65155c038f292c5d04138d6023c74d202e0aa 100644 (file)
 #   define MS_SYNCHRONOUS MNT_SYNCHRONOUS
 #   define MS_NOEXEC MNT_NOEXEC
 #   define MS_NOSUID MNT_NOSUID
-#   define MS_NODEV MNT_NODEV
+/*
+ * MNT_NODEV does not exist, or is set to 0, on newer versions of FreeBSD.
+ */
+#   if defined(MNT_NODEV) && MNT_NODEV
+#      define MS_NODEV MNT_NODEV
+#   endif
 #   define MS_UNION MNT_UNION
 #   define MS_ASYNC MNT_ASYNC
 #   define MS_SUIDDIR MNT_SUIDDIR
@@ -199,8 +204,10 @@ PrintUsage(void)
    printf("  rw                    mount read-write (default)\n");
    printf("  nosuid                ignore suid/sgid bits\n");
    printf("  suid                  allow suid/sgid bits (default)\n");
+#ifdef MS_NODEV
    printf("  nodev                 prevent device node access\n");
    printf("  dev                   allow device node access (default)\n");
+#endif
    printf("  noexec                prevent program execution\n");
    printf("  exec                  allow program execution (default)\n");
    printf("  sync                  file writes are synchronous\n");
@@ -603,12 +610,14 @@ ParseOptions(const char *optionString, // IN:  Option string to parse
       } else if (strcmp(key, "suid") == 0) {
          *flags &= ~MS_NOSUID;
          LOG("Setting mount option for allowing suid/sgid bits on\n");
+#ifdef MS_NODEV
       } else if (strcmp(key, "nodev") == 0) { // allow access to device nodes?
          *flags |= MS_NODEV;
          LOG("Setting mount option for accessing device nodes off\n");
       } else if (strcmp(key, "dev") == 0) {
          *flags &= ~MS_NODEV;
          LOG("Setting mount option for accessing device nodes on\n");
+#endif
       } else if (strcmp(key, "noexec") == 0) { // allow program execution?
          *flags |= MS_NOEXEC;
          LOG("Setting mount option for program execution off\n");
@@ -737,9 +746,11 @@ UpdateMtab(HgfsMountInfo *mountInfo,  // IN: Info to write into mtab
       if (flags & MS_NOSUID) {
          Str_Strcat(mountEnt.mnt_opts, ",nosuid", MOUNT_OPTS_BUFFER_SIZE);
       }
+#ifdef MS_NODEV
       if (flags & MS_NODEV) {
          Str_Strcat(mountEnt.mnt_opts, ",nodev", MOUNT_OPTS_BUFFER_SIZE);
       }
+#endif
       if (flags & MS_NOEXEC) {
          Str_Strcat(mountEnt.mnt_opts, ",noexec", MOUNT_OPTS_BUFFER_SIZE);
       }
diff --git a/open-vm-tools/hgfsmounter/stub-user-util.c b/open-vm-tools/hgfsmounter/stub-user-util.c
new file mode 100644 (file)
index 0000000..76fddd7
--- /dev/null
@@ -0,0 +1,57 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-user-util.c --
+ *
+ *   Stubs for Util_* functions in lib/user.
+ *
+ */
+
+#if defined(_WIN32)
+#  include <windows.h>
+#endif
+
+#include <stdlib.h>
+#include "vm_assert.h"
+#include "util.h"
+
+void
+Util_Backtrace(int bugNr)
+{
+   NOT_IMPLEMENTED();
+}
+
+
+void
+Util_ExitProcessAbruptly(int code) // IN
+{
+#if defined(_WIN32)
+   TerminateProcess(GetCurrentProcess(),code);
+#else
+   exit(code);
+#endif
+}
+
+
+char *
+Util_ExpandString(const char *fileName)
+{
+   NOT_IMPLEMENTED();
+}
+
index ede2ea9002519793dff44874054dbe89d300631f..5541896101408a1cc16e688ac4a185731168ee94 100644 (file)
 ################################################################################
 
 SUBDIRS =
+SUBDIRS += guestRpc
 SUBDIRS += auth
 SUBDIRS += backdoor
 SUBDIRS += conf
 SUBDIRS += dict
 SUBDIRS += dnd
+SUBDIRS += dynxdr
 SUBDIRS += err
 SUBDIRS += eventManager
 SUBDIRS += file
@@ -42,6 +44,7 @@ SUBDIRS += panic
 SUBDIRS += panicDefault
 SUBDIRS += printer
 SUBDIRS += procMgr
+SUBDIRS += resolution
 SUBDIRS += rpcIn
 SUBDIRS += rpcOut
 SUBDIRS += rpcVmx
@@ -49,6 +52,7 @@ SUBDIRS += SLPv2Parser
 SUBDIRS += socketMgr
 SUBDIRS += strUtil
 SUBDIRS += string
+SUBDIRS += stubs
 SUBDIRS += sync
 SUBDIRS += syncDriver
 SUBDIRS += system
index 7532d0924da4a4a2e15d15ad271c620f9164302e..79812d0cf59260d412c700ea38fcd7064b9defc8 100644 (file)
@@ -146,6 +146,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -210,13 +211,14 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = auth backdoor conf dict dnd err eventManager file foundryMsg \
-       ghIntegrationStub guestApp guestInfo hgfs hgfsBd hgfsServer \
-       hgfsServerManagerGuest hgfsServerPolicyGuest deployPkg \
-       impersonate message misc netUtil panic panicDefault printer \
-       procMgr rpcIn rpcOut rpcVmx SLPv2Parser socketMgr strUtil \
-       string sync syncDriver system toolsLogger unicode unityStub \
-       user vixTools vmBackupLib vmCheck vmSignal wiper
+SUBDIRS = guestRpc auth backdoor conf dict dnd dynxdr err eventManager \
+       file foundryMsg ghIntegrationStub guestApp guestInfo hgfs \
+       hgfsBd hgfsServer hgfsServerManagerGuest hgfsServerPolicyGuest \
+       deployPkg impersonate message misc netUtil panic panicDefault \
+       printer procMgr resolution rpcIn rpcOut rpcVmx SLPv2Parser \
+       socketMgr strUtil string stubs sync syncDriver system \
+       toolsLogger unicode unityStub user vixTools vmBackupLib \
+       vmCheck vmSignal wiper
 all: all-recursive
 
 .SUFFIXES:
index 2dbff28deadc6a4f2a149d52bbb9f99c2a447075..bc603cd3f136936782404908847373422aec8017 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index e1621adb63fd35dd469cf1024b52ea0ce9cb96c8..2ec5f999116319696866755a0cb2c519e8fd7f4a 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index f8f3d17686f9464d275604fba53fbb2798fadde9..cb0153b02be05f6f45fc1e5715191b4795d61645 100644 (file)
@@ -174,6 +174,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 7c5add9fb8cd3857ebaf926fd38b271aff872db3..b276fafafb12d42397de85cb5e411999d477f357 100644 (file)
@@ -160,6 +160,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index b0a2270f1b4ed61f000e754cc89fcd1588b737ac..574640688e65ca7abc1c47c3da829c81c2226e82 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 5c1d58e29d5f20b296a1ee1842cd2246b5bcc906..33d5c57a0f6341dc0583135ce39133074e7dd718 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 75f51b525e138776ec0c4f860c18999e3c7fe71b..1407c68e4cbfe3203317c6610dacdfd87eec0fed 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 105eae0d8f6fc45829785dc773a8de39204bfe5c..1d5e39e169b1bea9f7ba22acee95d0c1095382ac 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
diff --git a/open-vm-tools/lib/dynxdr/Makefile.am b/open-vm-tools/lib/dynxdr/Makefile.am
new file mode 100644 (file)
index 0000000..bf9c37d
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+noinst_LIBRARIES = libDynxdr.a
+
+libDynxdr_a_SOURCES = 
+libDynxdr_a_SOURCES += dynxdr.c
+libDynxdr_a_SOURCES += xdrutil.c
+
diff --git a/open-vm-tools/lib/dynxdr/Makefile.in b/open-vm-tools/lib/dynxdr/Makefile.in
new file mode 100644 (file)
index 0000000..d36b036
--- /dev/null
@@ -0,0 +1,480 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/dynxdr
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libDynxdr_a_AR = $(AR) $(ARFLAGS)
+libDynxdr_a_LIBADD =
+am_libDynxdr_a_OBJECTS = dynxdr.$(OBJEXT) xdrutil.$(OBJEXT)
+libDynxdr_a_OBJECTS = $(am_libDynxdr_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libDynxdr_a_SOURCES)
+DIST_SOURCES = $(libDynxdr_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libDynxdr.a
+libDynxdr_a_SOURCES = dynxdr.c xdrutil.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/dynxdr/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/dynxdr/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libDynxdr.a: $(libDynxdr_a_OBJECTS) $(libDynxdr_a_DEPENDENCIES) 
+       -rm -f libDynxdr.a
+       $(libDynxdr_a_AR) libDynxdr.a $(libDynxdr_a_OBJECTS) $(libDynxdr_a_LIBADD)
+       $(RANLIB) libDynxdr.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynxdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdrutil.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/lib/dynxdr/dynxdr.c b/open-vm-tools/lib/dynxdr/dynxdr.c
new file mode 100644 (file)
index 0000000..9326685
--- /dev/null
@@ -0,0 +1,372 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+#include <stdlib.h>
+#if defined(_WIN32)
+#  include <winsock2.h>
+#else
+#  include <sys/param.h>
+#  include <sys/types.h>
+#  include <netinet/in.h>
+#  include <arpa/inet.h>
+#endif
+
+#include "dynxdr.h"
+#include "dynbuf.h"
+
+/*
+ * dynxdr.c --
+ *
+ *    Implements an XDR stream backed by a DynBuf.
+ */
+
+
+typedef struct DynXdrData {
+   DynBuf   data;
+   Bool     freeMe;
+} DynXdrData;
+
+/*
+ * FreeBSD < 5.0 and Solaris do not declare some parameters as "const".
+ */
+#if defined(sun) || (defined(__FreeBSD__) && __FreeBSD_version < 500000)
+#  define DYNXDR_CONST
+#else
+#  define DYNXDR_CONST const
+#endif
+
+/*
+ * Mac OS X, FreeBSD and Solaris don't take a const parameter to the
+ * "x_getpostn" function.
+ */
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun)
+#  define DYNXDR_GETPOS_CONST
+#else
+#  define DYNXDR_GETPOS_CONST const
+#endif
+
+/*
+ * Solaris defines the parameter to "x_putbytes" as an int.
+ */
+#if defined(sun)
+#  define DYNXDR_SIZE_T int
+#else
+#  define DYNXDR_SIZE_T u_int
+#endif
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdrPutBytes --
+ *
+ *    Writes a byte array into the XDR stream.
+ *
+ * Results:
+ *    TRUE: all ok
+ *    FALSE: failed to add data do dynbuf.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static bool_t
+DynXdrPutBytes(XDR *xdrs,                 // IN/OUT
+               DYNXDR_CONST char *data,   // IN
+               DYNXDR_SIZE_T len)         // IN
+{
+   DynXdrData *priv = (DynXdrData *) xdrs->x_private;
+   return DynBuf_Append(&priv->data, data, len);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdrGetPos --
+ *
+ *    Returns the current position of the buffer, which is the same as
+ *    the current buffer size.
+ *
+ *    XXX: The Mac OS X headers don't expect a "const" argument.
+ *
+ * Results:
+ *    The size of the underlying buffer.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static u_int
+DynXdrGetPos(DYNXDR_GETPOS_CONST XDR *xdrs) // IN
+{
+   DynXdrData *priv = (DynXdrData *) xdrs->x_private;
+   return (u_int) DynBuf_GetSize(&priv->data);
+}
+
+
+#if defined(__GLIBC__)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdrPutInt32 --
+ *
+ *    Writes a 32-bit int to the XDR stream.
+ *
+ *    XXX: This seems to be a glibc-only extenstion. It's present since at
+ *    least glibc 2.1, according to their CVS.
+ *
+ * Results:
+ *    TRUE: all ok
+ *    FALSE: failed to add data do dynbuf.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static bool_t
+DynXdrPutInt32(XDR *xdrs,           // IN/OUT
+               const int32_t *ip)   // IN
+{
+   int32_t out = htonl(*ip);
+   DynXdrData *priv = (DynXdrData *) xdrs->x_private;
+   return DynBuf_Append(&priv->data, &out, sizeof out);
+}
+#endif
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdrPutLong --
+ *
+ *    Writes a 32-bit int to the XDR stream.
+ *
+ * Results:
+ *    TRUE: all ok
+ *    FALSE: failed to add data do dynbuf.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static bool_t
+DynXdrPutLong(XDR *xdrs,               // IN/OUT
+              DYNXDR_CONST long *lp)   // IN
+{
+   int32 out = htonl((int32)*lp);
+   DynXdrData *priv = (DynXdrData *) xdrs->x_private;
+   return DynBuf_Append(&priv->data, &out, sizeof out);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdr_Create --
+ *
+ *    Creates a new XDR struct backed by a DynBuf. The XDR stream is created
+ *    in XDR_ENCODE mode. The "in" argument is optional - if NULL, a new XDR
+ *    structure will be allocated.
+ *
+ * Results:
+ *    The XDR struct, or NULL on failure.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+XDR *
+DynXdr_Create(XDR *in)  // IN
+{
+   static struct xdr_ops dynXdrOps = {
+      NULL,             /* x_getlong */
+      DynXdrPutLong,    /* x_putlong */
+      NULL,             /* x_getbytes */
+      DynXdrPutBytes,   /* x_putbytes */
+      DynXdrGetPos,     /* x_getpostn */
+      NULL,             /* x_setpostn */
+      NULL,             /* x_inline */
+      NULL              /* x_destroy */
+#if defined(__GLIBC__)
+      , NULL,           /* x_getint32 */
+      DynXdrPutInt32    /* x_putint32 */
+#elif defined(__APPLE__)
+      , NULL            /* x_control */
+#endif
+   };
+
+   XDR *ret;
+   DynXdrData *priv;
+
+   if (in == NULL) {
+      ret = malloc(sizeof *ret);
+      if (ret == NULL) {
+         goto error;
+      }
+   } else {
+      ret = in;
+   }
+
+   priv = malloc(sizeof *priv);
+   if (priv == NULL) {
+      goto error;
+   }
+
+   priv->freeMe = (in == NULL);
+   DynBuf_Init(&priv->data);
+
+   ret->x_op = XDR_ENCODE;
+   ret->x_public = NULL;
+   ret->x_private = (char *) priv;
+   ret->x_base = 0;
+   ret->x_ops = &dynXdrOps;
+
+   return ret;
+
+error:
+   if (in == NULL) {
+      free(ret);
+   }
+   return NULL;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdr_AppendRaw --
+ *
+ *    Appends some raw bytes to the XDR stream's internal dynbuf. This is
+ *    useful when non-XDR data may need to be added to the buffer, avoiding
+ *    the need to create another buffer and copying the existing data.
+ *
+ * Results:
+ *    Whether appending the data was successful.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+
+Bool
+DynXdr_AppendRaw(XDR *xdrs,         // IN
+                 const void *buf,   // IN
+                 size_t len)        // IN
+{
+   DynBuf *intbuf = &((DynXdrData *) xdrs->x_private)->data;
+   return DynBuf_Append(intbuf, buf, len);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdr_GetData --
+ *
+ *    Returns a copy of the current data in the XDR buffer. Caller is
+ *    responsible for freeing the data.
+ *
+ * Results:
+ *    The current data in the buffer, or NULL if there's no data, or failed
+ *    to allocate data.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void *
+DynXdr_AllocGet(XDR *xdrs) // IN
+{
+   DynBuf *buf = &((DynXdrData *) xdrs->x_private)->data;
+   return DynBuf_AllocGet(buf);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdr_Get --
+ *
+ *    Returns the current data in the XDR buffer.
+ *
+ * Results:
+ *    The current data in the buffer, or NULL if there's no data.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void *
+DynXdr_Get(XDR *xdrs)  // IN
+{
+   DynBuf *buf = &((DynXdrData *) xdrs->x_private)->data;
+   return DynBuf_Get(buf);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * DynXdr_Destroy --
+ *
+ *    Frees data in the XDR stream, optionally destroying the underlying
+ *    DynBuf (if "release" is TRUE). If the XDR stream was dynamically
+ *    allocated by DynXdr_Create(), it will be freed.
+ *
+ * Results:
+ *    None.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+DynXdr_Destroy(XDR *xdrs,     // IN
+               Bool release)  // IN
+{
+   if (xdrs) {
+      DynXdrData *priv = (DynXdrData *) xdrs->x_private;
+      if (release) {
+         DynBuf_Destroy(&priv->data);
+      }
+      if (priv->freeMe) {
+         free(xdrs);
+      }
+      free(priv);
+   }
+}
+
diff --git a/open-vm-tools/lib/dynxdr/xdrutil.c b/open-vm-tools/lib/dynxdr/xdrutil.c
new file mode 100644 (file)
index 0000000..361f498
--- /dev/null
@@ -0,0 +1,69 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * xdrutil.c --
+ *
+ *    Utility functions for code that uses XDR to encode/decode data.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "xdrutil.h"
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * XdrUtil_ArrayAppend --
+ *
+ *    Appends 'cnt' new elements of size 'sz' at the end of the given array.
+ *    If successful, len will contain the count of elements in the new
+ *    array.
+ *
+ *    The newly allocated memory is zeroed out.
+ *
+ * Results:
+ *    NULL on allocation failure, pointer to the first new element otherwise.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void *
+XdrUtil_ArrayAppend(void **array,      // IN/OUT
+                    u_int *arrayLen,   // IN/OUT
+                    size_t elemSz,     // IN
+                    u_int elemCnt)     // IN
+{
+   void *ret = NULL;
+   void *newarray;
+
+   newarray = realloc(*array, (*arrayLen + elemCnt) * elemSz);
+   if (newarray != NULL) {
+      ret = &((char *)newarray)[*arrayLen * elemSz];
+      memset(ret, 0, elemSz * elemCnt);
+      *array = newarray;
+      *arrayLen = *arrayLen + elemCnt;
+   }
+
+   return ret;
+}
+
index 125089e2d595b36f70f2c540ac26d4fd09a70e58..512ddc063f612e46109a12302d2ed674fc221a45 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 51bcc95bfaf73803e37ddba22d1b9e32e321999e..df5e2fe9d36a3a848003c9826699c52bb36c509c 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 75fb7ca36d7d491d0f179a0e3f58efba3f294a71..b551f9d87190219a894318d505f5f5610e1bf400 100644 (file)
@@ -157,6 +157,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 8942baeeddd1fcac4cfc13b86c5c267f15d6234d..aa14ef492ec09546a58e1389d6d38d9bac7b1f53 100644 (file)
@@ -1251,6 +1251,114 @@ FileIO_Sync(const FileIODescriptor *file) // IN
 #if !defined(VMX86_TOOLS) || (!defined(__FreeBSD__) && !defined(sun))
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * FileIOCoalesce --
+ *
+ *      Linux 2.2 does a fairly braindead thing with ioVec's.  It simply issues
+ *      reads and writes internal to the kernel in serial
+ *      (linux/fs/read_write.c:do_readv_writev()).  We optimize here for the
+ *      case of many small chunks.  The cost of the extra copy in this case
+ *      is made up for by the decreased number of separate I/Os the kernel
+ *      issues internally. Note that linux 2.4 seems to be smarter with respect
+ *      to this problem.
+ *
+ * Results:
+ *      Bool - Whether or not coalescing was done.  If it was done,
+ *             FileIODecoalesce *MUST* be called.
+ *
+ * Side effects:
+ *      FileIOCoalesce will malloc *outVec if coalescing is performed
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+FileIOCoalesce(struct iovec *inVec,     // IN:  Vector to coalesce from
+               int inCount,             // IN:  count for inVec
+               size_t inTotalSize,      // IN:  totalSize (bytes) in inVec
+               Bool isWrite,            // IN:  coalesce for writing (or reading)
+               Bool forceCoalesce,      // IN:  if TRUE always coalesce
+               struct iovec *outVec)    // OUT: Coalesced (1-entry) iovec
+{
+   uint8 *cBuf;
+
+   ASSERT(inVec);
+   ASSERT(outVec);
+
+   FileIO_OptionalSafeInitialize();
+
+   /* simple case: no need to coalesce */
+   if (inCount == 1) {
+      return FALSE;
+   }
+
+   /*
+    * Only coalesce when the number of entries is above our count threshold
+    * and the average size of an entry is less than our size threshold
+    */
+   if (!forceCoalesce &&
+       (!filePosixOptions.enabled ||
+       inCount <= filePosixOptions.countThreshold ||
+       inTotalSize / inCount >= filePosixOptions.sizeThreshold)) {
+      return FALSE;
+   }
+
+   // XXX: Wouldn't it be nice if we could log from here!
+   //LOG(5, ("FILE: Coalescing %s of %d elements and %d size\n",
+   //        isWrite ? "write" : "read", inCount, inTotalSize));
+   cBuf = Util_SafeMalloc(sizeof(uint8) * inTotalSize);
+
+  if (isWrite) {
+      IOV_WriteIovToBuf(inVec, inCount, cBuf, inTotalSize);
+   }
+
+   outVec->iov_base = cBuf;
+   outVec->iov_len = inTotalSize;
+   return TRUE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * FileIODecoalesce --
+ *
+ *      Inverse of the coalesce optimization.  For writes, its a NOOP, but
+ *      for reads, it copies the data back into the original buffer.
+ *      It also frees the memory allocated by FileIOCoalesce.
+ *
+ * Results:
+ *      void
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static void
+FileIODecoalesce(struct iovec *coVec,   // IN: Coalesced (1-entry) vector
+                 struct iovec *origVec, // IN: Original vector
+                 int origVecCount,      // IN: count for origVec
+                 size_t actualSize,     // IN: # bytes to transfer back to origVec
+                 Bool isWrite)          // IN: decoalesce for writing (or reading)
+{
+   ASSERT(coVec);
+   ASSERT(origVec);
+
+   ASSERT(actualSize <= coVec->iov_len);
+   ASSERT_NOT_TESTED(actualSize == coVec->iov_len);
+
+   if (!isWrite) {
+      IOV_WriteBufToIov(coVec->iov_base, actualSize, origVec, origVecCount);
+   }
+
+   free(coVec->iov_base);
+}
+
+
 /*
  *----------------------------------------------------------------------
  *
@@ -1284,20 +1392,30 @@ FileIO_Readv(FileIODescriptor *fd,      // IN
    size_t bytesRead = 0, sum = 0;
    FileIOResult fret = FILEIO_ERROR;
    int nRetries = 0, maxRetries = numEntries;
-   struct iovec *vPtr = v;
-   int numVec = numEntries;
+   struct iovec coV;
+   struct iovec *vPtr;
+   Bool didCoalesce;
+   int numVec;
 
    ASSERT(fd);
 
+   didCoalesce = FileIOCoalesce(v, numEntries, totalSize, FALSE, FALSE, &coV);
+
    STAT_INST_INC(fd->stats, NumReadvs);
    STAT_INST_INC_BY(fd->stats, BytesReadv, totalSize);
    STATS_ONLY({
       fd->readvIn++;
       fd->bytesRead += totalSize;
+      if (didCoalesce) {
+         fd->numReadCoalesced++;
+      }
    })
 
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
+   numVec = didCoalesce ? 1 : numEntries;
+   vPtr = didCoalesce ? &coV : v;
+
    while (nRetries < maxRetries) {
       ssize_t retval;
       ASSERT(numVec > 0);
@@ -1345,6 +1463,10 @@ FileIO_Readv(FileIODescriptor *fd,      // IN
       }
    }
 
+   if (didCoalesce) {
+      FileIODecoalesce(&coV, v, numEntries, bytesRead, FALSE);
+   }
+
    if (actual) {
       *actual = bytesRead;
    }
@@ -1385,20 +1507,30 @@ FileIO_Writev(FileIODescriptor *fd,     // IN
    size_t bytesWritten = 0, sum = 0;
    FileIOResult fret = FILEIO_ERROR;
    int nRetries = 0, maxRetries = numEntries;
-   struct iovec *vPtr = v;
-   int numVec = numEntries;
+   struct iovec coV;
+   struct iovec *vPtr;
+   Bool didCoalesce;
+   int numVec;
 
    ASSERT(fd);
 
+   didCoalesce = FileIOCoalesce(v, numEntries, totalSize, TRUE, FALSE, &coV);
+
    STAT_INST_INC(fd->stats, NumWritevs);
    STAT_INST_INC_BY(fd->stats, BytesWritev, totalSize);
    STATS_ONLY({
       fd->writevIn++;
       fd->bytesWritten += totalSize;
+      if (didCoalesce) {
+         fd->numWriteCoalesced++;
+      }
    })
 
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
+   numVec = didCoalesce ? 1 : numEntries;
+   vPtr = didCoalesce ? &coV : v;
+
    while (nRetries < maxRetries) {
       ssize_t retval;
       ASSERT(numVec > 0);
@@ -1429,6 +1561,10 @@ FileIO_Writev(FileIODescriptor *fd,     // IN
       }
    }
 
+   if (didCoalesce) {
+      FileIODecoalesce(&coV, v, numEntries, bytesWritten, TRUE);
+   }
+
    if (actual) {
       *actual = bytesWritten;
    }
@@ -1465,21 +1601,33 @@ FileIO_Preadv(FileIODescriptor *fd,    // IN: File descriptor
               size_t totalSize)        // IN: totalSize (bytes) in entries
 {
    size_t sum = 0;
-   struct iovec *vPtr = entries;
-   int count = numEntries;
+   struct iovec *vPtr;
+   struct iovec coV;
+   int count;
    uint64 fileOffset;
    FileIOResult fret;
+   Bool didCoalesce;
 
    ASSERT(fd);
    ASSERT(entries);
    ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS));
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
+   didCoalesce = FileIOCoalesce(entries, numEntries, totalSize, FALSE,
+                                TRUE /* force coalescing */,
+                                &coV);
+
+   count = didCoalesce ? 1 : numEntries;
+   vPtr = didCoalesce ? &coV : entries;
+
    STAT_INST_INC(fd->stats, NumPreadvs);
    STAT_INST_INC_BY(fd->stats, BytesPreadv, totalSize);
    STATS_ONLY({
       fd->preadvIn++;
       fd->bytesRead += totalSize;
+      if (didCoalesce) {
+         fd->numReadCoalesced++;
+      }
    })
 
    fileOffset = offset;
@@ -1519,6 +1667,9 @@ FileIO_Preadv(FileIODescriptor *fd,    // IN: File descriptor
    fret = FILEIO_SUCCESS;
 
 exit:
+   if (didCoalesce) {
+      FileIODecoalesce(&coV, entries, numEntries, sum, FALSE);
+   }
 
    return fret;
 }
@@ -1550,8 +1701,10 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
                uint64 offset,          // IN: Offset to start writing
                size_t totalSize)       // IN: Total size (bytes) in entries
 {
-   struct iovec *vPtr = entries;
-   int count = numEntries;
+   struct iovec coV;
+   Bool didCoalesce;
+   struct iovec *vPtr;
+   int count;
    size_t sum = 0;
    uint64 fileOffset;
    FileIOResult fret;
@@ -1561,11 +1714,21 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
    ASSERT(!(fd->flags & FILEIO_ASYNCHRONOUS));
    ASSERT_NOT_IMPLEMENTED(totalSize < 0x80000000);
 
+   didCoalesce = FileIOCoalesce(entries, numEntries, totalSize, TRUE,
+                                TRUE /* force coalescing */,
+                                &coV);
+
+   count = didCoalesce ? 1 : numEntries;
+   vPtr = didCoalesce ? &coV : entries;
+
    STAT_INST_INC(fd->stats, NumPwritevs);
    STAT_INST_INC_BY(fd->stats, BytesPwritev, totalSize);
    STATS_ONLY({
       fd->pwritevIn++;
       fd->bytesWritten += totalSize;
+      if (didCoalesce) {
+         fd->numWriteCoalesced++;
+      }
    })
 
    fileOffset = offset;
@@ -1609,6 +1772,9 @@ FileIO_Pwritev(FileIODescriptor *fd,   // IN: File descriptor
 
    fret = FILEIO_SUCCESS;
 exit:
+   if (didCoalesce) {
+      FileIODecoalesce(&coV, entries, numEntries, sum, TRUE);
+   }
 
    return fret;
 }
index 4c14491cf72f601d54f2aa9bd2f6e8d77db76e22..af88b6c527052718745aac263b97d174132e7f7c 100644 (file)
@@ -76,7 +76,7 @@
 #define LOGLEVEL_MODULE main
 #include "loglevel_user.h"
 
-#define DEVICE_LOCK_DIR        "/var/lock"
+#define DEVICE_LOCK_DIR "/var/lock"
 
 /*
  * Parameters used by the file library.
@@ -128,7 +128,7 @@ FileLock_Init(int lockerPid,            // IN
  * IsLinkingAvailable --
  *
  *      Check if linking is supported in the filesystem where we create
- *     the lock file.
+ *      the lock file.
  *
  * Results:
  *      TRUE is we're sure it's supported.  FALSE otherwise.
@@ -218,7 +218,7 @@ IsLinkingAvailable(const char *fileName)     // IN:
  * FileLockGetPid --
  *
  *      Returns the pid of the main thread if we're running in a
- *     multithreaded process, otherwise return the result of getpid().
+ *      multithreaded process, otherwise return the result of getpid().
  *
  * Results:
  *      a pid.
@@ -324,7 +324,7 @@ GetLockFileValues(const char *lockFileName, // IN:
    char line[1000];
    Bool deleteLockFile;
 
-   int status;
+   int status;
 
    ASSERT(lockFileName);
    ASSERT(pid);
@@ -384,11 +384,11 @@ GetLockFileValues(const char *lockFileName, // IN:
  *
  * IsValidProcess --
  *
- *     Determine if the process, via its pid, is valid (alive).
+ *      Determine if the process, via its pid, is valid (alive).
  *
  * Results:
- *     TRUE    Yes
- *     FALSE   No
+ *      TRUE    Yes
+ *      FALSE   No
  *
  * Side effects:
  *      None.
@@ -552,9 +552,9 @@ exit:
  *      Change the host file system.
  *
  * Note:
- *     This locking method remains due to "minicom" and similar
- *     programs that use this locking method for access serialization
- *     of serial ports.
+ *      This locking method remains due to "minicom" and similar
+ *      programs that use this locking method for access serialization
+ *      of serial ports.
  *
  *----------------------------------------------------------------------
  */
@@ -585,7 +585,7 @@ FileLock_LockDevice(const char *deviceName)   // IN:
                FileLockGetPid(), hostID);
 
    while ((status = CreateLockFile(lockFileName, lockFileLink,
-                                               uniqueID)) == 0) {
+                                   uniqueID)) == 0) {
       int  pid;
       char fileID[1000];
 
@@ -650,7 +650,7 @@ exit:
  */
 
 Bool
-FileLock_UnlockDevice(const char *deviceName)  // IN:
+FileLock_UnlockDevice(const char *deviceName)  // IN:
 {
    Bool su;
    int  ret;
@@ -688,10 +688,11 @@ FileLock_UnlockDevice(const char *deviceName)     // IN:
  *
  * ReadSlashProc --
  *
- *     Read the data in a /proc file
+ *      Read the data in a /proc file
  *
  * Results:
- *     
+ *      0    Data is available
+ *      !0   Error (errno)
  *
  * Side effects:
  *      None.
@@ -745,11 +746,11 @@ ReadSlashProc(const char *procPath, // IN:
  *
  * ProcessCreationTime --
  *
- *     Return the specified process's creation time.
+ *      Return the specified process's creation time.
  *
  * Results:
- *     The process's creation time is returned. If an error occurs the
- *     reported creation time will be 0.
+ *      The process's creation time is returned. If an error occurs the
+ *      reported creation time will be 0.
  *
  * Side effects:
  *      None.
@@ -849,11 +850,11 @@ ProcessCreationTime(pid_t pid)
  *
  * FileLockValidOwner --
  *
- *     Validate the lock file owner.
+ *      Validate the lock file owner.
  *
  * Results:
- *     TRUE    Yes
- *     FALSE   No
+ *      TRUE    Yes
+ *      FALSE   No
  *
  * Side effects:
  *      None.
@@ -915,11 +916,11 @@ FileLockValidOwner(const char *executionID, // IN:
  *
  *  FileLockOpenFile --
  *
- *     Open the specified file
+ *      Open the specified file
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side effects:
  *      May change the host file system.
@@ -945,11 +946,11 @@ FileLockOpenFile(ConstUnicode pathName,        // IN:
  *
  *  FileLockCloseFile --
  *
- *     Close the specified file
+ *      Close the specified file
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side effects:
  *      May change the host file system.
@@ -969,11 +970,11 @@ FileLockCloseFile(FILELOCK_FILE_HANDLE handle) // IN:
  *
  * FileLockReadFile --
  *
- *     Read a file.
+ *      Read a file.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side effects:
  *      None
@@ -1009,11 +1010,11 @@ FileLockReadFile(FILELOCK_FILE_HANDLE handle,  // IN:
  *
  * FileLockWriteFile --
  *
- *     Write a file.
+ *      Write a file.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side effects:
  *      May change the host file system.
@@ -1044,26 +1045,51 @@ FileLockWriteFile(FILELOCK_FILE_HANDLE handle,  // IN:
 }
 
 
+/*
+ *---------------------------------------------------------------------------
+ *
+ * FileLockGetExecutionID --
+ *
+ *      Returns the executionID of the caller.
+ *
+ * Results:
+ *      The executionID of the caller.
+ *
+ * Side effects:
+ *      The executionID of the caller is not thread safe. Locking is currently
+ *      done at the process level - all threads of a process are treated
+ *      identically.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+char *
+FileLockGetExecutionID(void)
+{
+   return Str_SafeAsprintf(NULL, "%d", FileLockGetPid());
+}
+
+
 /*
  *----------------------------------------------------------------------
  *
  * FileLock_Lock --
  *
- *     Obtain a lock on a file; shared or exclusive access. Also specify
- *     how long to wait on lock acquisition - msecMaxWaitTime
+ *      Obtain a lock on a file; shared or exclusive access. Also specify
+ *      how long to wait on lock acquisition - msecMaxWaitTime
  *
- *     msecMaxWaitTime specifies the maximum amount of time, in
- *     milliseconds, to wait for the lock before returning the "not
- *     acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
- *     equivalent of a "try lock" - the lock will be acquired only if
- *     there is no contention. A value of FILELOCK_INFINITE_WAIT
- *     specifies "waiting forever" to acquire the lock.
+ *      msecMaxWaitTime specifies the maximum amount of time, in
+ *      milliseconds, to wait for the lock before returning the "not
+ *      acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
+ *      equivalent of a "try lock" - the lock will be acquired only if
+ *      there is no contention. A value of FILELOCK_INFINITE_WAIT
+ *      specifies "waiting forever" to acquire the lock.
  *
  * Results:
- *     NULL    Lock not acquired. Check err.
- *             err     0       Lock Timed Out
- *             err     !0      errno
- *     !NULL   Lock Acquired. This is the "lockToken" for an unlock.
+ *      NULL    Lock not acquired. Check err.
+ *              err     0       Lock Timed Out
+ *              err     !0      errno
+ *      !NULL   Lock Acquired. This is the "lockToken" for an unlock.
  *
  * Side effects:
  *      Changes the host file system.
@@ -1079,7 +1105,6 @@ FileLock_Lock(ConstUnicode filePath,        // IN:
 {
    Unicode fullPath;
    void *lockToken;
-   char pidString[16];
    char creationTimeString[32];
 
    ASSERT(filePath);
@@ -1091,16 +1116,11 @@ FileLock_Lock(ConstUnicode filePath,        // IN:
       return NULL;
    }
 
-   // Encode the callers process creation time
-   Str_Sprintf(creationTimeString, sizeof creationTimeString, "pc=%"FMT64"u",
+   Str_Sprintf(creationTimeString, sizeof creationTimeString, "%"FMT64"u",
                ProcessCreationTime(FileLockGetPid()));
 
-   // No thread information encoded - NOT THREAD SAFE
-   Str_Sprintf(pidString, sizeof pidString, "%d", FileLockGetPid());
-
-   lockToken = FileLockIntrinsic(FileLockGetMachineID(), pidString,
-                                 creationTimeString, fullPath, !readOnly,
-                                 msecMaxWaitTime, err);
+   lockToken = FileLockIntrinsic(fullPath, !readOnly, msecMaxWaitTime,
+                                 creationTimeString, err);
 
    Unicode_Free(fullPath);
 
@@ -1113,11 +1133,11 @@ FileLock_Lock(ConstUnicode filePath,        // IN:
  *
  * FileLock_Unlock --
  *
- *     Release the lock held on the specified file.
+ *      Release the lock held on the specified file.
  *
  * Results:
- *     0       unlocked
- *     >0      errno
+ *      0       unlocked
+ *      >0      errno
  *
  * Side effects:
  *      Changes the host file system.
@@ -1131,7 +1151,6 @@ FileLock_Unlock(ConstUnicode filePath,  // IN:
 {
    int err;
    Unicode fullPath;
-   char pidString[16];
 
    ASSERT(filePath);
    ASSERT(lockToken);
@@ -1141,11 +1160,7 @@ FileLock_Unlock(ConstUnicode filePath,  // IN:
       return EINVAL;
    }
 
-   // No thread information encoded - NOT THREAD SAFE
-   Str_Sprintf(pidString, sizeof pidString, "%d", FileLockGetPid());
-
-   err = FileUnlockIntrinsic(FileLockGetMachineID(), pidString, fullPath,
-                             lockToken);
+   err = FileUnlockIntrinsic(fullPath, lockToken);
 
    Unicode_Free(fullPath);
 
@@ -1158,17 +1173,17 @@ FileLock_Unlock(ConstUnicode filePath,  // IN:
  *
  * FileLock_DeleteFileVMX --
  *
- *     The VMX file delete primitive.
+ *      The VMX file delete primitive.
  *
  * Results:
- *     0       unlocked
- *     >0      errno
+ *      0       unlocked
+ *      >0      errno
  *
  * Side effects:
  *      Changes the host file system.
  *
  * Note:
- *     THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
+ *      THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
  *
  *----------------------------------------------------------------------
  */
@@ -1178,7 +1193,6 @@ FileLock_DeleteFileVMX(ConstUnicode filePath)  // IN:
 {
    int err;
    Unicode fullPath;
-   char pidString[16];
 
    ASSERT(filePath);
 
@@ -1187,10 +1201,7 @@ FileLock_DeleteFileVMX(ConstUnicode filePath)  // IN:
       return EINVAL;
    }
 
-   // No thread information encoded - NOT THREAD SAFE
-   Str_Sprintf(pidString, sizeof pidString, "%d", FileLockGetPid());
-
-   err = FileLockHackVMX(FileLockGetMachineID(), pidString, fullPath);
+   err = FileLockHackVMX(fullPath);
 
    Unicode_Free(fullPath);
 
index e9d74edd4f9f3df2d597e19c788c7b969836f6e6..35045c2ebb823adfa8e25d2ab040b974f89c3655 100644 (file)
@@ -43,6 +43,7 @@
 #include "vmware.h"
 #include "hostinfo.h"
 #include "util.h"
+#include "err.h"
 #include "log.h"
 #include "str.h"
 #include "file.h"
 #define LOGLEVEL_MODULE main
 #include "loglevel_user.h"
 
-#define        LOCK_SHARED     "S"
-#define        LOCK_EXCLUSIVE  "X"
+#define LOCK_SHARED     "S"
+#define LOCK_EXCLUSIVE  "X"
 #define FILELOCK_PROGRESS_DEARTH 8000 // Dearth of progress time in msec
 #define FILELOCK_PROGRESS_SAMPLE 200  // Progress sampling time in msec
 
 static char implicitReadToken;
 
+#define PARSE_TABLE_UINT   0
+#define PARSE_TABLE_STRING 1
+
+typedef struct parse_table
+{
+   int type;
+   char *name;
+   void *valuePtr;
+} ParseTable;
+
 
 /*
  *-----------------------------------------------------------------------------
  *
  * Sleeper --
  *
- *     Have the calling thread sleep "for a while". The duration of the
- *     sleep is determined by the count that is passed in. Checks are
- *     also done for exceeding the maximum wait time.
+ *      Have the calling thread sleep "for a while". The duration of the
+ *      sleep is determined by the count that is passed in. Checks are
+ *      also done for exceeding the maximum wait time.
  *
  * Results:
- *     0       slept
- *     EAGAIN  maximum sleep time exceeded
+ *      0       slept
+ *      EAGAIN  maximum sleep time exceeded
  *
  * Side effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -127,14 +138,14 @@ Sleeper(LockValues *myValues, // IN/OUT:
  *
  * RemoveLockingFile --
  *
- *     Remove the specified file.
+ *      Remove the specified file.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -169,16 +180,82 @@ RemoveLockingFile(ConstUnicode lockDir,   // IN:
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * FileLockParseArgs --
+ *
+ *      Parse the property list arguments of a lock file. The ParseTable
+ *      contains names of properies that are interesting to the caller;
+ *      only those values associated with the interesting names will be
+ *      extracted, the others will be ignored.
+ *
+ * Results:
+ *      TRUE    An error was detected
+ *      FALSE   All is well
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+FileLockParseArgs(char *argv[],       // IN:
+                  uint32 argCount,    // IN:
+                  ParseTable *table,  // IN:
+                  uint32 tableSize)   // IN:
+{
+   uint32 argPos = 5;  // The property list always starts with this argument
+
+   while (argCount) {
+      uint32 i;
+      char *p = strchr(argv[argPos], '=');
+
+      /* Validate the "name=value" form */
+      if ((p == NULL) || (p == argv[argPos]) || (p[1] == '\0')) {
+         return TRUE;
+      }
+
+      *p = '\0';
+
+      /* Unknown names are ignored without error */
+      for (i = 0; i < tableSize; i++) {
+         if (strcmp(argv[argPos], table[i].name) == 0) {
+            switch (table[i].type) {
+            case PARSE_TABLE_UINT:
+               if (sscanf(&p[1], "%u", (uint32 *) table[i].valuePtr) != 1) {
+                  return TRUE;
+               }
+               break;
+
+            case PARSE_TABLE_STRING:
+               *((char **) table[i].valuePtr) = &p[1];
+               break;
+            }
+         }
+      }
+
+      *p = '=';
+
+      argPos++;
+      argCount--;
+   }
+
+   return FALSE;
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
  * FileLockMemberValues --
  *
- *     Returns the values associated with lock directory file.
+ *      Returns the values associated with lock directory file.
  *
  * Results:
- *     0       Valid lock file; values have been returned
- *     > 0     Lock file problem (errno); values have not been returned
+ *      0       Valid lock file; values have been returned
+ *      > 0     Lock file problem (errno); values have not been returned
  *
  * Side effects:
  *      The lock file may be deleted if it is invalid
@@ -186,6 +263,8 @@ RemoveLockingFile(ConstUnicode lockDir,   // IN:
  *-----------------------------------------------------------------------------
  */
 
+#define FL_MAX_ARGS 16
+
 int
 FileLockMemberValues(ConstUnicode lockDir,     // IN:
                      ConstUnicode fileName,    // IN:
@@ -193,14 +272,19 @@ FileLockMemberValues(ConstUnicode lockDir,     // IN:
                      uint32 requiredSize,      // IN:
                      LockValues *memberValues) // OUT:
 {
-   uint32 i;
+   uint32 argc;
    FILELOCK_FILE_HANDLE handle;
    uint32 len;
-   char *argv[4];
+   char *argv[FL_MAX_ARGS];
    int err;
    Unicode path;
    FileData fileData;
 
+   ParseTable table = { PARSE_TABLE_STRING,
+                        "lc",
+                        (void *) &memberValues->locationChecksum
+                      };
    ASSERT(lockDir);
    ASSERT(fileName);
 
@@ -266,19 +350,56 @@ FileLockMemberValues(ConstUnicode lockDir,     // IN:
    }
 
    /* Extract and validate the lock file data. */
-   for (i = 0; i < 4; i++) {
-      argv[i] = strtok((i == 0) ? buffer : NULL, " ");
+   for (argc = 0; argc < FL_MAX_ARGS; argc++) {
+      argv[argc] = strtok((argc == 0) ? buffer : NULL, " ");
+
+      if (argv[argc] == NULL) {
+         break;
+      }
+   }
+
+   if ((argc < 4) || ((argc == FL_MAX_ARGS) && (strtok(NULL, " ") != NULL))) {
+      goto corrupt;
+   }
+
+   /*
+    * Lock file arguments are space separated. There is a minimum of 4
+    * arguments - machineID, executionID, Lamport number and lock type.
+    * The maximum number of arguments is FL_MAX_ARGS.
+    *
+    * The fifth argument, if present, is the payload or "[" if there is no
+    * payload and additional arguments are present. The additional arguments
+    * form  a properly list - one or more "name=value" pairs.
+    *
+    * Here is picture of valid forms:
+    *
+    * 0 1 2 3 4 5 6    Comment
+    *-------------------------
+    * A B C D         contents, no payload, no list entries
+    * A B C D [       contents, no payload, no list entries
+    * A B C D P       contents, a payload,  no list entries
+    * A B C D [ x     contents, no payload, one list entry
+    * A B C D P x     contents, a payload,  one list entry
+    * A B C D [ x y   contents, no payload, two list entries,
+    * A B C D P x y   contents, a payload,  two list entries
+    */
 
-      if (argv[i] == NULL) {
-         Warning(LGPFX" %s mandatory argument %u is missing!\n",
-                 __FUNCTION__, i);
+   memberValues->locationChecksum = NULL;
+
+   if (argc == 4) {
+      memberValues->payload = NULL;
+   } else {
+      if (strcmp(argv[4], "[") == 0) {
+         memberValues->payload = NULL;
+      } else {
+         memberValues->payload = argv[4];
+      }
 
+      if (FileLockParseArgs(argv, argc - 5, &table, 1)) {
          goto corrupt;
       }
    }
 
-   memberValues->payload = strtok(NULL, " ");
-
    if (sscanf(argv[2], "%u", &memberValues->lamportNumber) != 1) {
       Warning(LGPFX" %s Lamport number conversion error\n",
               __FUNCTION__);
@@ -325,14 +446,14 @@ bail:
  *
  * FileLockValidName --
  *
- *     Validate the format of the file name.
+ *      Validate the format of the file name.
  *
  * Results:
- *     TRUE    yes
- *     FALSE   No
+ *      TRUE    Yes
+ *      FALSE   No
  *
  * Side effects:
- *     None
+ *      None
  *
  *-----------------------------------------------------------------------------
  */
@@ -368,14 +489,14 @@ FileLockValidName(ConstUnicode fileName) // IN:
  *
  * ActivateLockList
  *
- *     Insure a lock list entry exists for the lock directory.
+ *      Insure a lock list entry exists for the lock directory.
  *
  * Results:
- *     0       success
- *     > 0     error (errno)
+ *     0        success
+ *     > 0      error (errno)
  *
  * Side effects:
- *     None.
+ *     None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -415,20 +536,66 @@ ActivateLockList(ConstUnicode dirName,  // IN:
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * FileLockLocationChecksum --
+ *
+ *      Compute the location checksum of the argument path.
+ *
+ * Results:
+ *      The location checksum as dynamically allocated string.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static char *
+FileLockLocationChecksum(ConstUnicode path)  // IN:
+{
+   int c;
+   uint32 hash = 5381;
+
+#if defined(_WIN32)
+   char *p;
+   Unicode value = Unicode_Duplicate(path);
+
+   /* Don't get fooled by mixed case; "normalize" */
+   Str_ToLower(value);
+   p = value;
+#else
+   char *p = (char *) path;
+#endif
+
+   /* DBJ2 hash... good enough? */
+   while ((c = *p++)) {
+      hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+   }
+
+#if defined(_WIN32)
+   Unicode_Free(value);
+#endif
+
+   return Str_SafeAsprintf(NULL, "%u", hash);
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
  * ScanDirectory --
  *
- *     Call the specified function for each member file found in the
- *     specified directory.
+ *      Call the specified function for each member file found in the
+ *      specified directory.
  *
  * Results:
- *     0       success
- *     > 0     failure
+ *      0       success
+ *      > 0     failure
  *
  * Side effects:
- *     Anything that this not a valid locking file is deleted.
+ *     Anything that this not a valid locking file is deleted.
  *
  *-----------------------------------------------------------------------------
  */
@@ -449,16 +616,18 @@ ScanDirectory(ConstUnicode lockDir,     // IN:
    int numEntries;
 
    Unicode *fileList = NULL;
+   char *myExecutionID = NULL;
+   char *locationChecksum = NULL;
 
    ASSERT(lockDir);
 
    numEntries = File_ListDirectory(lockDir, &fileList);
 
    if (numEntries == -1) {
-      Log(LGPFX" %s: Could not read the directory '%s'.\n",
-          __FUNCTION__, UTF8(lockDir));
+      Log(LGPFX" %s: Could not read the directory '%s': %d\n",
+          __FUNCTION__, UTF8(lockDir), Err_Errno());
 
-      return EDOM;     // out of my domain
+      return EDOM;  // out of my domain
    }
 
    /* Pass 1: Validate entries and handle any 'D' entries */
@@ -503,6 +672,9 @@ ScanDirectory(ConstUnicode lockDir,     // IN:
       goto bail;
    }
 
+   myExecutionID = FileLockGetExecutionID();
+   locationChecksum = FileLockLocationChecksum(lockDir);
+
    /* Pass 2: Handle the 'M' entries */
    for (i = 0, err = 0; i < numEntries; i++) {
       LockValues *ptr;
@@ -538,20 +710,35 @@ ScanDirectory(ConstUnicode lockDir,     // IN:
 
          /* Remove any stale locking files */
          if (FileLockMachineIDMatch(myValues->machineID,
-                                    memberValues.machineID) &&
-             !FileLockValidOwner(memberValues.executionID,
-                                 memberValues.payload)) {
-            Log(LGPFX" %s discarding %s from %s'; invalid executionID.\n",
-                __FUNCTION__, UTF8(fileList[i]), UTF8(lockDir));
+                                    memberValues.machineID)) {
+            char *dispose = NULL;
+
+            if (FileLockValidOwner(memberValues.executionID,
+                                   memberValues.payload)) {
+               /* If it's mine it better still be where I put it! */
+               if ((strcmp(myExecutionID, memberValues.executionID) == 0) &&
+                   ((memberValues.locationChecksum != NULL) &&
+                    (strcmp(memberValues.locationChecksum,
+                            locationChecksum) != 0))) {
+                  dispose = "lock file has been moved.";
+               }
+            } else {
+               dispose = "invalid executionID.";
+            }
 
-            Unicode_Free(memberValues.memberName);
+            if (dispose) {
+               Log(LGPFX" %s discarding %s from %s': %s\n",
+                   __FUNCTION__, UTF8(fileList[i]), UTF8(lockDir), dispose);
 
-            err = RemoveLockingFile(lockDir, fileList[i]);
-            if (err != 0) {
-               break;
-            }
+               Unicode_Free(memberValues.memberName);
 
-            continue;
+               err = RemoveLockingFile(lockDir, fileList[i]);
+               if (err != 0) {
+                  break;
+               }
+
+               continue;
+            }
          }
 
          ptr = &memberValues;
@@ -576,6 +763,8 @@ bail:
    }
 
    free(fileList);
+   free(locationChecksum);
+   free(myExecutionID);
 
    return err;
 }
@@ -586,16 +775,16 @@ bail:
  *
  * Scanner --
  *
- *     Call the specified function for each member file found in the
- *     specified directory. If a rescan is necessary check the list
- *     of outstanding locks and handle removing stale locks.
+ *      Call the specified function for each member file found in the
+ *      specified directory. If a rescan is necessary check the list
+ *      of outstanding locks and handle removing stale locks.
  *
  * Results:
- *     0       success
- *     > 0     failure
+ *     0        success
+ *     > 0      failure
  *
  * Side effects:
- *     None
+ *     None
  *
  *-----------------------------------------------------------------------------
  */
@@ -710,59 +899,28 @@ Scanner(ConstUnicode lockDir,    // IN:
  *
  * FileUnlockIntrinsic --
  *
- *     Release a lock on a file.
- *
- *     The locker is required to identify themselves in a "universally
- *     unique" manner. This is done via two parameters:
- *
- *     machineID --
- *             This a machine/hardware identifier string.
- *
- *             The MAC address of a hardware Ethernet, a WWN of a
- *             hardware FibreChannel HBA, the UUID of an Infiniband HBA
- *             and a machine serial number (e.g. Macs) are all good
- *             candidates for a machine identifier.
- *
- *     executionID --
- *             This is an string which differentiates one thread of
- *             execution from another within the host OS. In a
- *             non-threaded environment this can simply be some form
- *             of process identifier (e.g. getpid() on UNIXen or
- *             _getpid() on Windows). When a process makes use of
- *             threads AND more than one thread may perform locking
- *             this identifier must discriminate between all threads
- *             within the process.
- *
- *     All of the ID strings must encode their respective information
- *     such that any OS may utilize the strings as part of a file name.
- *     Keep them short and, at a minimum, do not use ':', '/', '\', '.'
- *     and white space characters.
+ *      Release a lock on a file.
  *
  * Results:
- *     0       unlocked
- *     > 0     errno
+ *      0       unlocked
+ *      > 0     errno
  *
  * Side effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
 
 int
-FileUnlockIntrinsic(const char *machineID,    // IN:
-                    const char *executionID,  // IN:
-                    ConstUnicode pathName,    // IN:
-                    const void *lockToken)    // IN:
+FileUnlockIntrinsic(ConstUnicode pathName,  // IN:
+                    const void *lockToken)  // IN:
 {
    int err;
 
-   ASSERT(machineID);
-   ASSERT(executionID);
    ASSERT(pathName);
    ASSERT(lockToken);
 
-   LOG(1, ("Releasing lock on %s (%s, %s).\n", UTF8(pathName),
-       machineID, executionID));
+   LOG(1, ("Requesting unlock on %s\n", UTF8(pathName)));
 
    if (lockToken == &implicitReadToken) {
       /*
@@ -772,10 +930,10 @@ FileUnlockIntrinsic(const char *machineID,    // IN:
 
       err = 0;
    } else {
-      Unicode dirPath;
+      Unicode lockDir;
 
       /* The lock directory path */
-      dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
+      lockDir = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
 
       /*
        * The lock token is the (unicode) path of the lock file.
@@ -798,9 +956,9 @@ FileUnlockIntrinsic(const char *machineID,    // IN:
 
       Unicode_Free((Unicode) lockToken);
 
-      FileRemoveDirectory(dirPath); // just in case we can clean up
+      FileRemoveDirectory(lockDir); // just in case we can clean up
 
-      Unicode_Free(dirPath);
+      Unicode_Free(lockDir);
    }
 
    return err;
@@ -812,15 +970,15 @@ FileUnlockIntrinsic(const char *machineID,    // IN:
  *
  * WaitForPossession --
  *
- *     Wait until the caller has a higher priority towards taking
- *     possession of a lock than the specified file.
+ *      Wait until the caller has a higher priority towards taking
+ *      possession of a lock than the specified file.
  *
  * Results:
- *     0       success
- *     > 0     error (errno)
+ *     0        success
+ *     > 0      error (errno)
  *
  * Side effects:
- *     None.
+ *     None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -906,14 +1064,14 @@ WaitForPossession(ConstUnicode lockDir,     // IN:
  *
  * NumberScan --
  *
- *     Determine the maxmimum number value within the current locking set.
+ *      Determine the maxmimum number value within the current locking set.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *     0        success
+ *     > 0      failure (errno)
  *
  * Side effects:
- *     None.
+ *     None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -940,13 +1098,13 @@ NumberScan(ConstUnicode lockDir,      // IN:
  *
  * SimpleRandomNumber --
  *
- *     Return a random number in the range of 0 and 2^16-1.
+ *      Return a random number in the range of 0 and 2^16-1.
  *
  * Results:
- *     Random number is returned.
+ *      Random number is returned.
  *
  * Side Effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -996,11 +1154,11 @@ SimpleRandomNumber(const char *machineID,   // IN:
  *
  * MakeDirectory --
  *
- *     Create a directory.
+ *      Create a directory.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side Effects:
  *      File system may be modified.
@@ -1009,7 +1167,7 @@ SimpleRandomNumber(const char *machineID,   // IN:
  */
 
 static int
-MakeDirectory(ConstUnicode pathName)
+MakeDirectory(ConstUnicode pathName)  // IN:
 {
    int err;
 
@@ -1036,22 +1194,22 @@ MakeDirectory(ConstUnicode pathName)
  *
  * CreateEntryDirectory --
  *
- *     Create an entry directory in the specified locking directory.
+ *      Create an entry directory in the specified locking directory.
  *
- *     Due to FileLock_UnlockFile() attempting to remove the locking
- *     directory on an unlock operation (to "clean up" and remove the
- *     locking directory when it is no longer needed), this routine
- *     must carefully handle a number of race conditions to insure the
- *     the locking directory exists and the entry directory is created
- *     within.
+ *      Due to FileLock_UnlockFile() attempting to remove the locking
+ *      directory on an unlock operation (to "clean up" and remove the
+ *      locking directory when it is no longer needed), this routine
+ *      must carefully handle a number of race conditions to insure the
+ *      the locking directory exists and the entry directory is created
+ *      within.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *      0       success
+ *      > 0     failure (errno)
  *
  * Side Effects:
- *     On success returns the number identifying the entry directory and
- *     the entry directory path name.
+ *      On success returns the number identifying the entry directory and
+ *      the entry directory path name.
  *
  *-----------------------------------------------------------------------------
  */
@@ -1213,14 +1371,14 @@ CreateEntryDirectory(const char *machineID,    // IN:
  *
  * CreateMemberFile --
  *
- *     Create the member file.
+ *      Create the member file.
  *
  * Results:
- *     0       success
- *     > 0     failure (errno)
+ *     0        success
+ *     > 0      failure (errno)
  *
  * Side Effects:
- *     None
+ *     None
  *
  *-----------------------------------------------------------------------------
  */
@@ -1238,11 +1396,25 @@ CreateMemberFile(FILELOCK_FILE_HANDLE entryHandle,  // IN:
    ASSERT(entryFilePath);
    ASSERT(memberFilePath);
 
-   /* Populate the buffer with appropriate data */
-   Str_Sprintf(buffer, sizeof buffer, "%s %s %u %s %s", myValues->machineID,
-               myValues->executionID, myValues->lamportNumber,
+   /*
+    * Populate the buffer with appropriate data
+    *
+    * Lock file arguments are space separated. There is a minimum of 4
+    * arguments - machineID, executionID, Lamport number and lock type.
+    * The maximum number of argument is FL_MAX_ARGS.
+    *
+    * The fifth argument, if present, is the payload or "[" if there is no
+    * payload and additional arguments are present. The additional arguments
+    * form  a properly list - one or more "name=value" pairs.
+    */
+
+   Str_Sprintf(buffer, sizeof buffer, "%s %s %u %s %s lc=%s",
+               myValues->machineID,
+               myValues->executionID,
+               myValues->lamportNumber,
                myValues->lockType,
-               myValues->payload == NULL ? "" : myValues->payload);
+               myValues->payload == NULL ? "[" : myValues->payload,
+               myValues->locationChecksum);
 
    /* Attempt to write the data */
    err = FileLockWriteFile(entryHandle, buffer, sizeof buffer, &len);
@@ -1300,84 +1472,56 @@ CreateMemberFile(FILELOCK_FILE_HANDLE entryHandle,  // IN:
  *
  * FileLockIntrinsic --
  *
- *     Obtain a lock on a file; shared or exclusive access.
- *
- *     Each locker is required to identify themselves in a "universally
- *     unique" manner. This is done via two parameters:
- *
- *     machineID --
- *             This a machine/hardware identifier string.
- *
- *             The MAC address of a hardware Ethernet, a WWN of a
- *             hardware FibreChannel HBA, the UUID of an Infiniband HBA
- *             and a machine serial number (e.g. Macs) are all good
- *             candidates for a machine identifier.
+ *      Obtain a lock on a file; shared or exclusive access.
  *
- *             The machineID is "univerally unique", discriminating
- *             between all computational platforms.
- *
- *     executionID --
- *             This is an string which differentiates one thread of
- *             execution from another within the host OS. In a
- *             non-threaded environment this can simply be some form
- *             of process identifier (e.g. getpid() on UNIXen or
- *             _getpid() on Windows). When a process makes use of
- *             threads AND more than one thread may perform locking
- *             this identifier must discriminate between all threads
- *             within the process.
- *
- *     All of the ID strings must encode their respective information
- *     such that any OS may utilize the strings as part of a file name.
- *     Keep them short and, at a minimum, do not use ':', '/', '\', '.'
- *     and white space characters.
- *
- *     msecMaxWaitTime specifies the maximum amount of time, in
- *     milliseconds, to wait for the lock before returning the "not
- *     acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
- *     equivalent of a "try lock" - the lock will be acquired only if
- *     there is no contention. A value of FILELOCK_INFINITE_WAIT
- *     specifies "waiting forever" to acquire the lock.
+ *      msecMaxWaitTime specifies the maximum amount of time, in
+ *      milliseconds, to wait for the lock before returning the "not
+ *      acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
+ *      equivalent of a "try lock" - the lock will be acquired only if
+ *      there is no contention. A value of FILELOCK_INFINITE_WAIT
+ *      specifies "waiting forever" to acquire the lock.
  *
  * Results:
- *     NULL    Lock not acquired. Check err.
- *             err     0       Lock Timed Out
- *             err     > 0     errno
- *     !NULL   Lock Acquired. This is the "lockToken" for an unlock.
+ *      NULL    Lock not acquired. Check err.
+ *              err     0       Lock Timed Out
+ *              err     > 0     errno
+ *      !NULL   Lock Acquired. This is the "lockToken" for an unlock.
  *
  * Side effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
 
 void *
-FileLockIntrinsic(const char *machineID,    // IN:
-                  const char *executionID,  // IN:
-                  const char *payload,      // IN:
-                  ConstUnicode pathName,    // IN:
-                  Bool exclusivity,         // IN:
-                  uint32 msecMaxWaitTime,   // IN:
-                  int *err)                 // OUT:
+FileLockIntrinsic(ConstUnicode pathName,   // IN:
+                  Bool exclusivity,        // IN:
+                  uint32 msecMaxWaitTime,  // IN:
+                  const char *payload,     // IN:
+                  int *err)                // OUT:
 {
    FILELOCK_FILE_HANDLE handle;
    LockValues myValues;
 
-   Unicode dirPath = NULL;
+   Unicode lockDir = NULL;
    Unicode entryFilePath = NULL;
    Unicode memberFilePath = NULL;
    Unicode entryDirectory = NULL;
 
-   ASSERT(machineID);
-   ASSERT(executionID);
    ASSERT(pathName);
    ASSERT(err);
 
+   /* Construct the locking directory path */
+   lockDir = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
+
    /* establish our values */
-   myValues.machineID = (char *) machineID;
-   myValues.executionID = (char *) executionID;
+
+   myValues.machineID = (char *) FileLockGetMachineID(); // don't free this!
+   myValues.executionID = FileLockGetExecutionID();      // free this!
    myValues.payload = (char *) payload;
    myValues.lockType = exclusivity ? LOCK_EXCLUSIVE : LOCK_SHARED;
    myValues.lamportNumber = 0;
+   myValues.locationChecksum = FileLockLocationChecksum(lockDir); // free this!
    myValues.waitTime = 0;
    myValues.msecMaxWaitTime = msecMaxWaitTime;
    myValues.memberName = NULL;
@@ -1386,15 +1530,13 @@ FileLockIntrinsic(const char *machineID,    // IN:
        myValues.lockType, UTF8(pathName), myValues.machineID,
        myValues.executionID, myValues.msecMaxWaitTime));
 
-   /* Construct the locking directory path */
-   dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
-
    /*
     * Attempt to create the locking and entry directories; obtain the
     * entry and member path names.
     */
 
-   *err = CreateEntryDirectory(machineID, executionID, dirPath,
+   *err = CreateEntryDirectory(myValues.machineID, myValues.executionID,
+                               lockDir,
                                &entryDirectory, &entryFilePath,
                                &memberFilePath, &myValues.memberName);
 
@@ -1433,20 +1575,20 @@ FileLockIntrinsic(const char *machineID,    // IN:
    if (*err != 0) {
       /* clean up */
       FileRemoveDirectory(entryDirectory);
-      FileRemoveDirectory(dirPath);
+      FileRemoveDirectory(lockDir);
 
       goto bail;
    }
 
    /* what is max(Number[1]... Number[all lockers])? */
-   *err = Scanner(dirPath, NumberScan, &myValues, FALSE);
+   *err = Scanner(lockDir, NumberScan, &myValues, FALSE);
 
    if (*err != 0) {
       /* clean up */
       FileLockCloseFile(handle);
       FileDeletion(entryFilePath, FALSE);
       FileRemoveDirectory(entryDirectory);
-      FileRemoveDirectory(dirPath);
+      FileRemoveDirectory(lockDir);
 
       goto bail;
    }
@@ -1464,13 +1606,13 @@ FileLockIntrinsic(const char *machineID,    // IN:
       /* clean up */
       FileDeletion(entryFilePath, FALSE);
       FileDeletion(memberFilePath, FALSE);
-      FileRemoveDirectory(dirPath);
+      FileRemoveDirectory(lockDir);
 
       goto bail;
    }
 
    /* Attempt to acquire the lock */
-   *err = Scanner(dirPath, WaitForPossession, &myValues, TRUE);
+   *err = Scanner(lockDir, WaitForPossession, &myValues, TRUE);
 
    switch (*err) {
    case 0:
@@ -1479,7 +1621,7 @@ FileLockIntrinsic(const char *machineID,    // IN:
    case EAGAIN:
       /* clean up */
       FileDeletion(memberFilePath, FALSE);
-      FileRemoveDirectory(dirPath);
+      FileRemoveDirectory(lockDir);
 
       /* FALL THROUGH */
    default:
@@ -1488,10 +1630,12 @@ FileLockIntrinsic(const char *machineID,    // IN:
 
 bail:
 
-   Unicode_Free(dirPath);
+   Unicode_Free(lockDir);
    Unicode_Free(entryDirectory);
    Unicode_Free(entryFilePath);
    Unicode_Free(myValues.memberName);
+   free(myValues.locationChecksum);
+   free(myValues.executionID);
 
    if (*err != 0) {
       Unicode_Free(memberFilePath);
@@ -1511,14 +1655,14 @@ bail:
  *
  * ScannerVMX --
  *
- *     VMX hack scanner
+ *      VMX hack scanner
  *
  * Results:
- *     0       success
- *     > 0     error (errno)
+ *      0       success
+ *      > 0     error (errno)
  *
  * Side effects:
- *     None.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
@@ -1543,49 +1687,49 @@ ScannerVMX(ConstUnicode lockDir,     // IN:
  *
  * FileLockHackVMX --
  *
- *     The VMX file delete primitive.
+ *      The VMX file delete primitive.
  *
  * Results:
- *     0       unlocked
- *     > 0     errno
+ *      0       unlocked
+ *      > 0     errno
  *
  * Side effects:
  *      Changes the host file system.
  *
  * Note:
- *     THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
+ *      THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
  *
  *----------------------------------------------------------------------
  */
 
 int
-FileLockHackVMX(const char *machineID,    // IN:
-                const char *executionID,  // IN:
-                ConstUnicode pathName)    // IN:
+FileLockHackVMX(ConstUnicode pathName)  // IN:
 {
-   int        err;
+   int err;
    LockValues myValues;
 
-   Unicode dirPath = NULL;
+   Unicode lockDir = NULL;
    Unicode entryFilePath = NULL;
    Unicode memberFilePath = NULL;
    Unicode entryDirectory = NULL;
 
    ASSERT(pathName);
 
-   LOG(1, ("%s on %s (%s, %s).\n", __FUNCTION__, UTF8(pathName),
-       machineID, executionID));
+   /* first the locking directory path name */
+   lockDir = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
 
    /* establish our values */
-   myValues.machineID = (char *) machineID;
-   myValues.executionID = (char *) executionID;
+   myValues.machineID = (char *) FileLockGetMachineID(); // don't free this!
+   myValues.executionID = FileLockGetExecutionID();      // free this!
+   myValues.locationChecksum = FileLockLocationChecksum(lockDir); // free this!
    myValues.lamportNumber = 0;
    myValues.memberName = NULL;
 
-   /* first the locking directory path name */
-   dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
+   LOG(1, ("%s on %s (%s, %s).\n", __FUNCTION__, UTF8(pathName),
+       myValues.machineID, myValues.executionID));
 
-   err = CreateEntryDirectory(machineID, executionID, dirPath,
+   err = CreateEntryDirectory(myValues.machineID, myValues.executionID,
+                              lockDir,
                               &entryDirectory, &entryFilePath,
                               &memberFilePath, &myValues.memberName);
 
@@ -1594,7 +1738,7 @@ FileLockHackVMX(const char *machineID,    // IN:
    }
 
    /* Scan the lock directory */
-   err = Scanner(dirPath, ScannerVMX, &myValues, FALSE);
+   err = Scanner(lockDir, ScannerVMX, &myValues, FALSE);
 
    if (err == 0) {
       /* if no members are valid, clean up */
@@ -1610,15 +1754,17 @@ FileLockHackVMX(const char *machineID,    // IN:
 
    /* clean up */
    FileRemoveDirectory(entryDirectory);
-   FileRemoveDirectory(dirPath);
+   FileRemoveDirectory(lockDir);
 
 bail:
 
-   Unicode_Free(dirPath);
+   Unicode_Free(lockDir);
    Unicode_Free(entryDirectory);
    Unicode_Free(entryFilePath);
    Unicode_Free(memberFilePath);
    Unicode_Free(myValues.memberName);
+   free(myValues.locationChecksum);
+   free(myValues.executionID);
 
    return err;
 }
index ba1926f14f7eb5b7a20327ee8817d9ff4a6b56dd..d5b711c3268e35889ac8844ac52fc86338b63478 100644 (file)
@@ -157,6 +157,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 4d8558f557e3abbc9e99fbb4ae337e498a476b47..cfe522e40b9d03faae5e7a443d36d22be2ebda29 100644 (file)
@@ -615,7 +615,7 @@ VixMsg_ObfuscateNamePassword(const char *userName,      // IN
 
    resultString = VixMsgEncodeBuffer(packedBuffer, packedBufferLength, FALSE);
 
-   free(packedBuffer);
+   Util_ZeroFree(packedBuffer, packedBufferLength);
 
    return(resultString);
 } // VixMsg_ObfuscateNamePassword
@@ -646,8 +646,9 @@ VixMsg_DeObfuscateNamePassword(const char *packagedName,   // IN
    Bool success = FALSE;
    char *packedString = NULL;
    char *srcPtr;
+   size_t packedStringLength;
 
-   packedString = VixMsgDecodeBuffer(packagedName, FALSE, NULL);
+   packedString = VixMsgDecodeBuffer(packagedName, FALSE, &packedStringLength);
    if (NULL == packedString) {
       goto abort;
    }
@@ -664,7 +665,7 @@ VixMsg_DeObfuscateNamePassword(const char *packagedName,   // IN
    success = TRUE;
 
 abort:
-   free(packedString);
+   Util_ZeroFree(packedString, packedStringLength);
 
    return(success);
 } // VixMsg_DeObfuscateNamePassword
index c6794f3439d557edc4610c045fce082b6cbc9eff..e44981f1aacd81dbc4d2463265a73be47cdc928f 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 85a7d84af9de4765e37b991695732acef4cd8301..bdfbad033d35483c2f815a7e33c9364d41ba74f1 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 031dc85bf76e607025b3ebaa49c367184126937d..f3192249da8f593f51199a97e5b17ec797afed39 100644 (file)
@@ -705,58 +705,6 @@ GuestApp_GetPtrGrabCap(const char *channel) // IN
 }
 
 
-/*
- *----------------------------------------------------------------------
- *
- * GuestApp_SetVersion --
- *
- *      Set the tools version through the backdoor.
- *
- * Results:
- *      TRUE if the rpci send succeeded
- *      FALSE if it failed
- *
- * Side effects:
- *     None
- *
- *----------------------------------------------------------------------
- */
-
-Bool
-GuestApp_SetVersion(void)
-{
-   Debug("Setting tools version to '%u'\n", TOOLS_VERSION_CURRENT);
-
-   return RpcOut_sendOne(NULL, NULL, "tools.set.version %u",
-                         TOOLS_VERSION_CURRENT);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * GuestApp_GetCurrentVersion --
- *
- *      Get the current version of this guest app. This wrapper
- *      method is provided so that it can be exported in a COM, etc.
- *      wrapper.
- *
- * Results:
- *      The version.
- *
- * Side effects:
- *     None.
- *
- *----------------------------------------------------------------------
- */
-
-uint32
-GuestApp_GetCurrentVersion(void)
-{
-   return TOOLS_VERSION_CURRENT;
-}
-
-
 /*
  *----------------------------------------------------------------------
  *
@@ -1268,12 +1216,90 @@ GuestApp_GetCmdOutput(const char *cmd) // IN
  */
 
 Bool
-GuestApp_IsHgfsCapable()
+GuestApp_IsHgfsCapable(void)
 {
    return RpcOut_sendOne(NULL, NULL, HGFS_SYNC_REQREP_CLIENT_CMD);
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestApp_IsDiskShrinkCapable --
+ *
+ *      Is the host capable of doing disk shrinks?
+ *
+ * Results:
+ *      TRUE if the host is capable of disk shrink operations
+ *      FALSE if the host is not capable of disk shrink operations
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestApp_IsDiskShrinkCapable(void)
+{
+   return RpcOut_sendOne(NULL, NULL, "disk.wiper.enable");
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestApp_IsDiskShrinkEnabled --
+ *
+ *      Is disk shrinking enabled
+ *
+ * Results:
+ *      TRUE if disk shrinking is enabled
+ *      FALSE if disk shrinking is not enabled
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestApp_IsDiskShrinkEnabled(void) {
+   char *result;
+   size_t resultLen;
+   Bool enabled = FALSE;
+   if (RpcOut_sendOne(&result, &resultLen, "disk.wiper.enable")) {
+      if (resultLen == 1 && strcmp(result, "1") == 0) {
+         enabled = TRUE;
+      } else {
+         enabled = FALSE;
+      }
+   }
+   free(result);
+   return enabled;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestApp_DiskShrink --
+ *
+ *      Shrink disk
+ *
+ * Results:
+ *      TRUE if the shrinking is successful
+ *      FALSE if disk shrinking is not successful
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestApp_DiskShrink(void) {
+   return RpcOut_sendOne(NULL, NULL, "disk.shrink");
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
index ec29c76f827f2624281cff04980bf8c8b9686a65..2d66a1c3e9194b75976ccb0d3452d3491b757702 100644 (file)
 noinst_LIBRARIES = libGuestInfo.a
 
 libGuestInfo_a_SOURCES =
+libGuestInfo_a_SOURCES += guestInfo.c
 libGuestInfo_a_SOURCES += guestInfoServer.c
 libGuestInfo_a_SOURCES += guestInfoPosix.c
 libGuestInfo_a_SOURCES += guestInfoPerfMonLinux.c
 
 AM_CFLAGS = $(DNET_CPPFLAGS)
 AM_CFLAGS += $(PROCPS_CPPFLAGS)
+AM_CFLAGS += -I$(top_builddir)/include
+
index 5005726b697d1727a8a054e4f86eb89cee267ce7..b24ed8cb5db8d20edb4a5efc928f4996612b8768 100644 (file)
@@ -61,8 +61,9 @@ LIBRARIES = $(noinst_LIBRARIES)
 ARFLAGS = cru
 libGuestInfo_a_AR = $(AR) $(ARFLAGS)
 libGuestInfo_a_LIBADD =
-am_libGuestInfo_a_OBJECTS = guestInfoServer.$(OBJEXT) \
-       guestInfoPosix.$(OBJEXT) guestInfoPerfMonLinux.$(OBJEXT)
+am_libGuestInfo_a_OBJECTS = guestInfo.$(OBJEXT) \
+       guestInfoServer.$(OBJEXT) guestInfoPosix.$(OBJEXT) \
+       guestInfoPerfMonLinux.$(OBJEXT)
 libGuestInfo_a_OBJECTS = $(am_libGuestInfo_a_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -156,6 +157,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -221,9 +223,10 @@ target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libGuestInfo.a
-libGuestInfo_a_SOURCES = guestInfoServer.c guestInfoPosix.c \
-       guestInfoPerfMonLinux.c
-AM_CFLAGS = $(DNET_CPPFLAGS) $(PROCPS_CPPFLAGS)
+libGuestInfo_a_SOURCES = guestInfo.c guestInfoServer.c \
+       guestInfoPosix.c guestInfoPerfMonLinux.c
+AM_CFLAGS = $(DNET_CPPFLAGS) $(PROCPS_CPPFLAGS) \
+       -I$(top_builddir)/include
 all: all-am
 
 .SUFFIXES:
@@ -271,6 +274,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestInfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestInfoPerfMonLinux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestInfoPosix.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestInfoServer.Po@am__quote@
diff --git a/open-vm-tools/lib/guestInfo/guestInfo.c b/open-vm-tools/lib/guestInfo/guestInfo.c
new file mode 100644 (file)
index 0000000..96c17f3
--- /dev/null
@@ -0,0 +1,150 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * guestInfo.c ---
+ *
+ *     Provides interface to information about the guest, such as hostname,
+ *     NIC/IP address information, etc.
+ */
+
+
+#include "guestInfoInt.h"
+
+
+/*
+ * Global functions
+ */
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestInfo_GetFqdn --
+ *
+ *      Returns the guest's hostname.
+ *
+ * Results:
+ *      Returns TRUE on success, FALSE on failure.
+ *      Returns the guest's fully qualified domain name in fqdn.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestInfo_GetFqdn(int outBufLen,        // IN: sizeof fqdn
+                  char fqdn[])          // OUT: buffer to store hostname
+{
+   return GuestInfoGetFqdn(outBufLen, fqdn);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestInfo_GetNicInfo --
+ *
+ *      Returns the guest's hostname.
+ *
+ * Results:
+ *      Return MAC addresses of all the NICs in the guest and their
+ *      corresponding IP addresses.
+ *
+ *      Returns TRUE on success and FALSE on failure.
+ *      Return MAC addresses of all NICs and their corresponding IPs.
+ *
+ * Side effects:
+ *      Memory is allocated for each NIC, as well as IP addresses of all NICs
+ *      on successful return.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestInfo_GetNicInfo(GuestNicList *nicInfo)  // OUT: storage for NIC information
+{
+   return GuestInfoGetNicInfo(nicInfo);
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GuestInfo_GetDiskInfo --
+ *
+ *      Get disk information.
+ *
+ * Results:
+ *      TRUE if successful, FALSE otherwise.
+ *
+ * Side effects:
+ *     Allocates memory for di->partitionList.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Bool
+GuestInfo_GetDiskInfo(PGuestDiskInfo di)     // IN/OUT
+{
+   return GuestInfoGetDiskInfo(di);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GuestInfoGetOSName --
+ *
+ *      Return OS version information.
+ *
+ *      osFullName format:
+ *        Linux/POSIX:
+ *          <OS NAME> <OS RELEASE> <SPECIFIC_DISTRO_INFO>
+ *        An example of such string would be:
+ *          Linux 2.4.18-3 Red Hat Linux release 7.3 (Valhalla)
+ *
+ *        Win32:
+ *          <OS NAME> <SERVICE PACK> (BUILD <BUILD_NUMBER>)
+ *        An example of such string would be:
+ *          Windows XP Professional Service Pack 2 (Build 2600)
+ *
+ *      osName contains an os name in the same format that is used
+ *      in .vmx file.
+ *
+ * Results:
+ *      Returns TRUE on success and FALSE on failure.
+ *      Returns the guest's full OS name (osNameFull)
+ *      Returns the guest's OS name in the same format as .vmx file (osName)
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+GuestInfo_GetOSName(unsigned int outBufFullLen, // IN
+                    unsigned int outBufLen,     // IN
+                    char *osNameFull,           // OUT
+                    char *osName)               // OUT
+{
+   return GuestInfoGetOSName(outBufFullLen, outBufLen, osNameFull, osName);
+}
index a7609b62ea0b7bdab1c3de4e59dcaeebc1de1935..e9d01fa84009fe0a7d6fc4991243d1545e9170ea 100644 (file)
@@ -133,8 +133,8 @@ GuestInfoMonitorGetStat(GuestMemInfo *vmStats)   // OUT: filled vmstats
 
    vmStats->swapInRate = (uint64)((*swapIn  * kb_per_page * hz + cpuHalf) / cpuTotal);
    vmStats->swapOutRate = (uint64)((*swapOut * kb_per_page * hz + cpuHalf) / cpuTotal);
-   vmStats->ioInRate = (uint64)((*pageIn * hz + cpuHalf) / cpuTotal);
-   vmStats->ioOutRate = (uint64)((*pageOut * hz + cpuHalf) / cpuTotal);
+   vmStats->ioInRate = (uint64)((*pageIn * kb_per_page * hz + cpuHalf) / cpuTotal);
+   vmStats->ioOutRate = (uint64)((*pageOut * kb_per_page * hz + cpuHalf) / cpuTotal);
 
 
    Debug("GuestInfoMonitorGetStat: GuestMemInfo: total: %"FMT64"u free: %"FMT64"u"\
index 2d93f3453926142ce30891dc9e93b6eb68d13a86..c3f0e299c2f057311351a84414ddd97b1923123e 100644 (file)
@@ -41,7 +41,7 @@
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <errno.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__APPLE__)
 # include <sys/sysctl.h>
 #endif
 #ifndef NO_DNET
@@ -189,33 +189,33 @@ GuestInfoGetFqdn(int outBufLen,    // IN: length of output buffer
 
 int
 ReadInterfaceDetails(const struct intf_entry *entry,  // IN: current interface entry
-                     void *arg)                       // IN: Pointer to the GuestNicInfo
+                     void *arg)                       // IN: Pointer to the GuestNicList
 {
    int i;
-
-   GuestNicInfo *nicInfo = (GuestNicInfo *)arg;
+   GuestNicList *nicInfo = arg;
 
    if ((entry->intf_type & INTF_TYPE_ETH) == INTF_TYPE_ETH) {
-      NicEntry *nicEntryCur;
-      char macAddress[MAC_ADDR_SIZE];
-      char ipAddress[IP_ADDR_SIZE_V2];
+      GuestNic *nic;
+      char macAddress[NICINFO_MAC_LEN];
+      char ipAddress[NICINFO_MAX_IP_LEN];
 
       Str_Sprintf(macAddress, sizeof macAddress,
                   addr_ntoa(&entry->intf_link_addr));
-      nicEntryCur = GuestInfoAddNicEntry(nicInfo, macAddress);
-      if (nicEntryCur == NULL) {
+      nic = GuestInfoAddNicEntry(nicInfo, macAddress);
+
+      if (nic == NULL) {
          return -1;
       }
 
       if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
-         VmIpAddressEntry *ipAddressEntry = NULL;
+         VmIpAddress *ip = NULL;
          /* Use ip_ntop instead of addr_ntop since we don't want the netmask bits. */
          ip_ntop(&entry->intf_addr.addr_ip, ipAddress, sizeof ipAddress);
-         ipAddressEntry = GuestInfoAddIpAddress(nicEntryCur,
-                                                ipAddress,
-                                                INFO_IP_ADDRESS_FAMILY_IPV4);
-         if (ipAddressEntry) {
-            GuestInfoAddSubnetMask(ipAddressEntry, entry->intf_addr.addr_bits);
+         ip = GuestInfoAddIpAddress(nic,
+                                    ipAddress,
+                                    INFO_IP_ADDRESS_FAMILY_IPV4);
+         if (ip) {
+            GuestInfoAddSubnetMask(ip, entry->intf_addr.addr_bits);
          }
          /* Walk the list of alias's and add those that are IPV4 or IPV6 */
          for (i = 0; i < entry->intf_alias_num; i++) {
@@ -223,18 +223,17 @@ ReadInterfaceDetails(const struct intf_entry *entry,  // IN: current interface e
                ip_ntop(&entry->intf_alias_addrs[i].addr_ip,
                        ipAddress,
                        sizeof ipAddress);
-               ipAddressEntry = GuestInfoAddIpAddress(nicEntryCur,
-                                                      ipAddress,
-                                                      INFO_IP_ADDRESS_FAMILY_IPV4);
-               if (ipAddressEntry) {
-                  GuestInfoAddSubnetMask(ipAddressEntry,
-                                         entry->intf_addr.addr_bits);
+               ip = GuestInfoAddIpAddress(nic,
+                                          ipAddress,
+                                          INFO_IP_ADDRESS_FAMILY_IPV4);
+               if (ip) {
+                  GuestInfoAddSubnetMask(ip, entry->intf_addr.addr_bits);
                }
             } else if (entry->intf_alias_addrs[i].addr_type == ADDR_TYPE_IP6) {
                memcpy(ipAddress,
                       addr_ntoa(&entry->intf_alias_addrs[i]),
                       sizeof ipAddress);
-               GuestInfoAddIpAddress(nicEntryCur,
+               GuestInfoAddIpAddress(nic,
                                      ipAddress,
                                      INFO_IP_ADDRESS_FAMILY_IPV6);
             }
@@ -266,13 +265,12 @@ ReadInterfaceDetails(const struct intf_entry *entry,  // IN: current interface e
  */
 
 Bool
-GuestInfoGetNicInfo(GuestNicInfo *nicInfo)           // OUT
+GuestInfoGetNicInfo(GuestNicList *nicInfo)   // OUT
 {
 #ifndef NO_DNET
    intf_t *intf;
 
    memset(nicInfo, 0, sizeof *nicInfo);
-   DblLnkLst_Init(&nicInfo->nicList);
 
    /* Get a handle to read the network interface configuration details. */
    if ((intf = intf_open()) == NULL) {
@@ -768,7 +766,7 @@ int
 GuestInfo_GetSystemBitness(void)
 {
    char buf[MAX_ARCH_NAME_LEN] = { 0 };
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
    int mib[2];
    size_t len;
 
index 9bbf63cfd76d394e4a114bddefc184f71c6ce270..fbd9407fce390a246e94f325f7351bb7685b4360 100644 (file)
@@ -36,6 +36,7 @@
 #include "vmware.h"
 #include "eventManager.h"
 #include "debug.h"
+#include "dynxdr.h"
 #include "str.h"
 #include "util.h"
 #include "rpcout.h"
@@ -48,6 +49,7 @@
 #include "system.h"
 #include "wiper.h" // for WiperPartition functions
 #include "guest_msg_def.h" // For GUESTMSG_MAX_IN_SIZE
+#include "xdrutil.h"
 
 #define GUESTINFO_DEFAULT_DELIMITER ' '
 
@@ -57,7 +59,7 @@
 
 typedef struct _GuestInfoCache{
    char value[INFO_MAX][MAX_VALUE_LEN]; /* Stores values of all key-value pairs. */
-   GuestNicInfo  nicInfo;
+   GuestNicList  nicInfo;
    GuestDiskInfo diskInfo;
 } GuestInfoCache;
 
@@ -79,114 +81,13 @@ static GuestInfoCache gInfoCache;
 
 static Bool vmResumed;
 
-/*
- * The Windows Guest Info Server runs in a separate thread,
- * so we have to synchronize access to 'vmResumed' variable.
- * Non-windows guest info server does not run in a separate
- * thread, so no locking is needed.
- */
-
-#if defined(_WIN32)
-typedef CRITICAL_SECTION vmResumedLockType;
-#define GUESTINFO_DELETE_LOCK(lockPtr) DeleteCriticalSection(lockPtr)
-#define GUESTINFO_ENTER_LOCK(lockPtr) EnterCriticalSection(lockPtr)
-#define GUESTINFO_LEAVE_LOCK(lockPtr) LeaveCriticalSection(lockPtr)
-#define GUESTINFO_INIT_LOCK(lockPtr) InitializeCriticalSection(lockPtr)
-
-vmResumedLockType vmResumedLock;
-
-#else // #if LINUX
-
-typedef int vmResumedLockType;
-#define GUESTINFO_DELETE_LOCK(lockPtr)
-#define GUESTINFO_ENTER_LOCK(lockPtr)
-#define GUESTINFO_LEAVE_LOCK(lockPtr)
-#define GUESTINFO_INIT_LOCK(lockPtr)
-
-#endif // #if LINUX
-
 static Bool GuestInfoGather(void * clientData);
 static Bool GuestInfoUpdateVmdb(GuestInfoType infoType, void* info);
 static Bool SetGuestInfo(GuestInfoType key, const char* value, char delimiter);
-static Bool NicInfoChanged(GuestNicInfo *nicInfo);
+static Bool NicInfoChanged(GuestNicList *nicInfo);
 static Bool DiskInfoChanged(PGuestDiskInfo diskInfo);
 static void GuestInfoClearCache(void);
-static Bool GuestInfoSerializeNicInfo(GuestNicInfo *nicInfo,
-                                      char buffer[GUESTMSG_MAX_IN_SIZE],
-                                      size_t *bufferLen);
-static int PrintNicInfo(GuestNicInfo *nicInfo, int (*PrintFunc)(const char *, ...));
-
-#ifdef _WIN32
-static Bool GuestInfoConvertNicInfoToNicInfoV1(GuestNicInfo *info, GuestNicInfoV1 *infoV1);
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestInfoServer_Main --
- *
- *    The main event loop for the guest info server.
- *    GuestInfoServer_Init() much be called prior to calling this function.
- *
- * Result
- *    None
- *
- * Side-effects
- *    Events are processed, information gathered and updates sent.
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestInfoServer_Main(void *data) // IN
-{
-   int retVal;
-   uint64 sleepUsecs;
-   HANDLE *events = (HANDLE *) data;
-   HANDLE quitEvent;
-   HANDLE finishedEvent;
-
-   ASSERT(data);
-   ASSERT(events[0]);
-   ASSERT(events[1]);
-
-   quitEvent = events[0];
-   finishedEvent = events[1];
-
-   Debug("Starting GuestInfoServer for Windows.\n");
-   for(;;) {
-      DWORD dwError;
-
-      retVal = EventManager_ProcessNext(gGuestInfoEventQueue, &sleepUsecs);
-      if (retVal != 1) {
-         Debug("Unexpected end of the guest info loop.\n");
-         break;
-      }
-
-      /*
-       * The number of micro seconds to sleep should not overflow a long. This
-       * corresponds to a maximum sleep time of around 4295 seconds (~ 71 minutes)
-       * which should be more than enough.
-       */
-
-      Debug("Sleeping for %"FMT64"u msecs...\n", sleepUsecs / 1000);
-      dwError = WaitForSingleObject(quitEvent, sleepUsecs / 1000);
-      if (dwError == WAIT_OBJECT_0) {
-         GuestApp_Log("GuestInfoServer received quit event.\n");
-         Debug("GuestInfoServer received quit event.\n");
-         break;
-      } else if (dwError == WAIT_TIMEOUT) {
-         Debug("GuestInfoServer woke up.\n");
-      } else if (dwError == WAIT_FAILED) {
-         Debug("GuestInfoServer error waiting on exit event: %d %d\n",
-               dwError, GetLastError());
-         break;
-      }
-   }
-   SetEvent(finishedEvent);
-   GuestApp_Log("GuestInfoServer exiting.\n");
-}
-#endif
+static int PrintNicInfo(GuestNicList *nicInfo, int (*PrintFunc)(const char *, ...));
 
 
 /*
@@ -325,7 +226,7 @@ GuestInfoGather(void *clientData)   // IN: unused
    char name[255];
    char osNameFull[MAX_VALUE_LEN];
    char osName[MAX_VALUE_LEN];
-   GuestNicInfo nicInfo;
+   GuestNicList nicInfo;
    GuestDiskInfo diskInfo;
 #if defined(_WIN32) || defined(linux)
    GuestMemInfo vmStats = {0};
@@ -443,72 +344,57 @@ GuestInfoGather(void *clientData)   // IN: unused
  */
 
 Bool
-GuestInfoConvertNicInfoToNicInfoV1(GuestNicInfo *info,             // IN
-                                   GuestNicInfoV1  *infoV1)        // OUT
+GuestInfoConvertNicInfoToNicInfoV1(GuestNicList *info,        // IN
+                                   GuestNicInfoV1 *infoV1)    // OUT
 {
-   NicEntry *nicEntryCur;
    uint32 maxNics;
-   uint32 nicIndex = 0;
-   DblLnkLst_Links *nicEntryLink;
+   u_int i;
 
    if ((NULL == info) ||
        (NULL == infoV1)) {
       return FALSE;
    }
 
-   maxNics = info->nicInfoProto.numNicEntries > MAX_NICS ?
-                                   MAX_NICS : info->nicInfoProto.numNicEntries;
+   maxNics = MIN(info->nics.nics_len, MAX_NICS);
    infoV1->numNicEntries = maxNics;
-   if (maxNics < info->nicInfoProto.numNicEntries) {
-      Debug("Truncating NICs.\n");
+   if (maxNics < info->nics.nics_len) {
+      Debug("GuestInfo: truncating NIC list for backwards compatibility.\n");
    }
 
-   DblLnkLst_ForEach(nicEntryLink, &info->nicList) {
-      uint32 ipIndex = 0;
+   XDRUTIL_FOREACH(i, info, nics) {
+      u_int j;
       uint32 maxIPs;
-      VmIpAddressEntry *ipAddressCur;
-      DblLnkLst_Links *ipAddrLink;
-
-      if (nicIndex >= maxNics) {
-         break;
-      }
-
-      nicEntryCur = DblLnkLst_Container(nicEntryLink,
-                                        NicEntry,
-                                        links);
-      if (NULL == nicEntryCur) {
-         return FALSE;
+      GuestNic *nic = XDRUTIL_GETITEM(info, nics, i);
+      
+      Str_Strcpy(infoV1->nicList[i].macAddress,
+                 nic->macAddress,
+                 sizeof infoV1->nicList[i].macAddress);
+
+      maxIPs = MIN(nic->ips.ips_len, MAX_IPS);
+      infoV1->nicList[i].numIPs = 0;
+
+      XDRUTIL_FOREACH(j, nic, ips) {
+         VmIpAddress *ip = XDRUTIL_GETITEM(nic, ips, j);
+         
+         if (strlen(ip->ipAddress) < sizeof infoV1->nicList[i].ipAddress[j]) {
+            Str_Strcpy(infoV1->nicList[i].ipAddress[j],
+                       ip->ipAddress,
+                       sizeof infoV1->nicList[i].ipAddress[j]);
+            infoV1->nicList[i].numIPs++;
+            if (infoV1->nicList[i].numIPs == maxIPs) {
+               break;
+            }
+         } else {
+            Debug("GuestInfo: ignoring IPV6 address for compatibility.\n");
+         }
       }
 
-      strcpy(infoV1->nicList[nicIndex].macAddress, nicEntryCur->nicEntryProto.macAddress);
-
-      maxIPs = nicEntryCur->nicEntryProto.numIPs > MAX_IPS ?
-                                          MAX_IPS : nicEntryCur->nicEntryProto.numIPs;
-      nicEntryCur -> nicEntryProto.numIPs = maxIPs;
-      if (maxIPs < nicEntryCur->nicEntryProto.numIPs) {
-         Debug("Truncating IP addresses for NIC %d.\n", nicIndex);
+      if (infoV1->nicList[i].numIPs != nic->ips.ips_len) {
+         Debug("GuestInfo: some IP addresses were ignored for compatibility.\n");
       }
-
-      DblLnkLst_ForEach(ipAddrLink, &nicEntryCur->ipAddressList) {
-
-         if (ipIndex >= maxIPs) {
-            break;
-         }
-
-         ipAddressCur = DblLnkLst_Container(ipAddrLink,
-                                          VmIpAddressEntry,
-                                          links);
-         if (NULL == ipAddressCur) {
-            return FALSE;
-         }
-         strcpy(infoV1->nicList[nicIndex].ipAddress[ipIndex],
-                ipAddressCur->ipEntryProto.ipAddress);
-
-         ipIndex++;
-         infoV1->nicList[nicIndex].numIPs = ipIndex;
+      if (i == maxNics) {
+         break;
       }
-
-      nicIndex++;
    }
 
    return TRUE;
@@ -574,35 +460,52 @@ GuestInfoUpdateVmdb(GuestInfoType infoType, // IN: guest information type
       break;
 
    case INFO_IPADDRESS:
-      if (NicInfoChanged((GuestNicInfo *)info)) {
+      if (NicInfoChanged((GuestNicList *)info)) {
          static Bool isCmdV1 = FALSE;
-         char request[GUESTMSG_MAX_IN_SIZE];
-         size_t requestLength = 0;
          char *reply = NULL;
          size_t replyLen;
          Bool status;
 
          if (FALSE == isCmdV1) {
-            Debug("Creating nic info message.\n");
-            Str_Sprintf(request,
-                        sizeof request,
-                        "%s  %d ",
-                        GUEST_INFO_COMMAND_TWO,
-                        INFO_IPADDRESS);
+            /* 13 = max size of string representation of an int + 3 spaces. */
+            char request[sizeof GUEST_INFO_COMMAND + 13];
+            GuestNicProto message;
+            XDR xdrs;
 
-            if (GuestInfoSerializeNicInfo((GuestNicInfo *)info,
-                                          request + strlen(request),
-                                          &requestLength)) {
-               requestLength += strlen(request);
-            } else {
+            if (DynXdr_Create(&xdrs) == NULL) {
+               return FALSE;
+            }
+
+            /* Add the RPC preamble: message name, and type. */
+            Str_Sprintf(request, sizeof request, "%s  %d ",
+                        GUEST_INFO_COMMAND, INFO_IPADDRESS_V2);
+
+            message.ver = NIC_INFO_V2;
+            message.GuestNicProto_u.nicsV2 = info;
+
+            /* Write preamble and serialized nic info to XDR stream. */
+            if (!DynXdr_AppendRaw(&xdrs, request, strlen(request)) ||
+                !xdr_GuestNicProto(&xdrs, &message)) {
+               Debug("GuestInfo: Error serializing nic info v2 data.");
+               DynXdr_Destroy(&xdrs, TRUE);
                return FALSE;
             }
 
-            Debug("GuestInfo: Sending nic info message.\n");
-            /* Send all the information in the message. */
-            status = RpcOut_SendOneRaw(request, requestLength, &reply, &replyLen);
+            status = RpcOut_SendOneRaw(DynXdr_Get(&xdrs),
+                                       xdr_getpos(&xdrs),
+                                       &reply,
+                                       &replyLen);
+            DynXdr_Destroy(&xdrs, TRUE);
+            if (status) {
+               Debug("GuestInfo: sent nic info message.\n");
+            } else {
+               Debug("GuestInfo: failed to send V2 nic info message.\n");
+            }
 
-            Debug("GuestInfo: Just sent nic info message.\n");
+            if (RpcVMX_ConfigGetBool(FALSE, "printNicInfo")) {
+               PrintNicInfo((GuestNicList *) info,
+                            (int (*)(const char *fmt, ...)) RpcVMX_Log);
+            }
          } else {
             status = FALSE;
          }
@@ -648,28 +551,16 @@ GuestInfoUpdateVmdb(GuestInfoType infoType, // IN: guest information type
             }
          }
 
-         if (RpcVMX_ConfigGetBool(FALSE, "printNicInfo")) {
-            PrintNicInfo((GuestNicInfo *) info, (int (*)(const char *fmt, ...)) RpcVMX_Log);
-         }
-
          Debug("GuestInfo: Updated new NIC information\n");
          free(reply);
          reply = NULL;
 
          /*
-          * Update the cache.  Assign info to gInfoCache.nicInfo. First free dynamic
-          * memory allocated in gInfoCache.nicInfo. Then unlink those in nicInfo and
-          * link them back to gInfoCache.nicInfo this is sort of hacking.  However, it
-          * works in this case, since nicInfo is not going to be used after this.  NOTE,
-          * nicInfo CAN NOT BE USED AFTER THIS POINT.
+          * Update the cache. Release the memory previously used by the cache,
+          * and copy the new information into the cache.
           */
-         GuestInfo_FreeDynamicMemoryInNicInfo(&gInfoCache.nicInfo);
-         /* assign the fixed memory part */
-         gInfoCache.nicInfo = *(GuestNicInfo *)info;
-         /* assign the dynamic memory part */
-         DblLnkLst_Init(&gInfoCache.nicInfo.nicList);
-         DblLnkLst_Link(&gInfoCache.nicInfo.nicList, ((GuestNicInfo *)info)->nicList.next);
-         DblLnkLst_Unlink1(&((GuestNicInfo *)info)->nicList);
+         VMX_XDR_FREE(xdr_GuestNicList, &gInfoCache.nicInfo);
+         gInfoCache.nicInfo = *(GuestNicList *)info;
       } else {
          Debug("GuestInfo: Nic info not changed.\n");
       }
@@ -858,11 +749,11 @@ SetGuestInfo(GuestInfoType key,  // IN: the VMDB key to set
  *
  * GuestInfoFindMacAddress --
  *
- *      Locates a MAC address in the NIC info structure.
+ *      Locates a NIC with the given MAC address in the NIC list.
  *
  * Return value:
  *      If there is an entry in nicInfo which corresponds to this MAC address,
- *      its index is returned. If not -1 is returned.
+ *      it is returned. If not NULL is returned.
  *
  * Side effects:
  *      None
@@ -870,20 +761,16 @@ SetGuestInfo(GuestInfoType key,  // IN: the VMDB key to set
  *-----------------------------------------------------------------------------
  */
 
-NicEntry *
-GuestInfoFindMacAddress(GuestNicInfo *nicInfo, const char *macAddress)
+GuestNic *
+GuestInfoFindMacAddress(GuestNicList *nicInfo,  // IN/OUT
+                        const char *macAddress) // IN
 {
-   NicEntry *nicEntry;
-   DblLnkLst_Links *sCurrent;
+   u_int i;
 
-   if (0 == nicInfo->nicInfoProto.numNicEntries) {
-      return NULL;
-   }
-
-   DblLnkLst_ForEach(sCurrent, &nicInfo->nicList) {
-      nicEntry = DblLnkLst_Container(sCurrent, NicEntry, links);
-      if (Str_Strcasecmp(macAddress, nicEntry->nicEntryProto.macAddress) == 0) {
-         return nicEntry;
+   for (i = 0; i < nicInfo->nics.nics_len; i++) {
+      GuestNic *nic = &nicInfo->nics.nics_val[i];
+      if (strncmp(nic->macAddress, macAddress, NICINFO_MAC_LEN) == 0) {
+         return nic;
       }
    }
 
@@ -911,86 +798,56 @@ GuestInfoFindMacAddress(GuestNicInfo *nicInfo, const char *macAddress)
  */
 
 Bool
-NicInfoChanged(GuestNicInfo *nicInfo)     // IN:
+NicInfoChanged(GuestNicList *nicInfo)  // IN
 {
-   char *currentMac;
-   GuestNicInfo *cachedNicInfo;
-   NicEntry *cachedNic;
-   DblLnkLst_Links *cachedNicLink;
-
-   cachedNicInfo = &gInfoCache.nicInfo;
-   cachedNic = DblLnkLst_Container(cachedNicInfo->nicList.next,
-                                   NicEntry,
-                                   links);
-
-   if (cachedNicInfo->nicInfoProto.numNicEntries !=
-       nicInfo->nicInfoProto.numNicEntries) {
+   u_int i;
+   GuestNicList *cachedNicInfo = &gInfoCache.nicInfo;
+
+   if (cachedNicInfo->nics.nics_len != nicInfo->nics.nics_len) {
       Debug("GuestInfo: number of nics has changed\n");
       return TRUE;
    }
 
-   /* Have any MAC or IP addresses been modified? */
-   DblLnkLst_ForEach(cachedNicLink, &cachedNicInfo->nicList) {
-      NicEntry *matchedNIC;
-      DblLnkLst_Links *curCachedIpLink;
-
-      cachedNic = DblLnkLst_Container(cachedNicLink, NicEntry, links);
-      currentMac = cachedNic->nicEntryProto.macAddress;
+   for (i = 0; i < cachedNicInfo->nics.nics_len; i++) {
+      u_int j;
+      GuestNic *cachedNic = &cachedNicInfo->nics.nics_val[i];
+      GuestNic *matchedNic;
 
       /* Find the corresponding nic in the new nic info. */
-      matchedNIC = GuestInfoFindMacAddress(nicInfo, currentMac);
+      matchedNic = GuestInfoFindMacAddress(nicInfo, cachedNic->macAddress);
 
-      if (NULL == matchedNIC) {
+      if (NULL == matchedNic) {
          /* This mac address has been deleted. */
          return TRUE;
       }
 
-      if (matchedNIC->nicEntryProto.numIPs != cachedNic->nicEntryProto.numIPs) {
+      if (matchedNic->ips.ips_len != cachedNic->ips.ips_len) {
          Debug("GuestInfo: count of ip addresses for mac %d\n",
-                                                matchedNIC->nicEntryProto.numIPs);
+                                                matchedNic->ips.ips_len);
          return TRUE;
       }
 
       /* Which IP addresses have been modified for this NIC? */
-      DblLnkLst_ForEach(curCachedIpLink, &cachedNic->ipAddressList) {
-         char *currentCachedIp;
-         VmIpAddressEntry *cachedIpAddress;
-         DblLnkLst_Links * matchedIpAddressLink;
+      for (j = 0; j < matchedNic->ips.ips_len; j++) {
+         VmIpAddress *cachedIp = &cachedNic->ips.ips_val[i];
          Bool foundIP = FALSE;
-
-         cachedIpAddress = DblLnkLst_Container(curCachedIpLink,
-                                               VmIpAddressEntry,
-                                               links);
-
-         if (cachedIpAddress) {
-            currentCachedIp = cachedIpAddress->ipEntryProto.ipAddress;
-         } else {
-            break;
-         }
-
-         DblLnkLst_ForEach(matchedIpAddressLink, &matchedNIC->ipAddressList) {
-            VmIpAddressEntry *matchedIpAddressEntry =
-                                  DblLnkLst_Container(matchedIpAddressLink,
-                                                      VmIpAddressEntry,
-                                                      links);
-
-            if (matchedIpAddressEntry) {
-               if (strncmp(matchedIpAddressEntry->ipEntryProto.ipAddress,
-                           currentCachedIp,
-                           IP_ADDR_SIZE_V2) == 0) {
-                  foundIP = TRUE;
-                  break;
-               }
-            } else {
+         u_int k;
+
+         for (k = 0; k < matchedNic->ips.ips_len; k++) {
+            VmIpAddress *matchedIp = &matchedNic->ips.ips_val[k];
+            if (strncmp(cachedIp->ipAddress,
+                        matchedIp->ipAddress,
+                        NICINFO_MAX_IP_LEN)) {
+               foundIP = TRUE;
                break;
             }
          }
 
-
          if (FALSE == foundIP) {
             /* This ip address couldn't be found and has been modified. */
-            Debug("GuestInfo: mac address %s, ipaddress %s deleted\n", currentMac,
-                  currentCachedIp);
+            Debug("GuestInfo: mac address %s, ipaddress %s deleted\n",
+                  cachedNic->macAddress,
+                  cachedIp->ipAddress);
             return TRUE;
          }
 
@@ -1002,143 +859,6 @@ NicInfoChanged(GuestNicInfo *nicInfo)     // IN:
 }
 
 
-/*
- *----------------------------------------------------------------------
- *
- * GuestInfoSerializeNicInfo --
- *
- *      Now that GuestNicInfo is not fixed size, serialize nicInfo into a
- *      buffer, in order to send it over wire.
- *
- * Results:
- *
- *      TRUE if successful, FALSE otherwise.
- *
- * Side effects:
- *
- *     None.
- *
- *----------------------------------------------------------------------
- */
-
-Bool
-GuestInfoSerializeNicInfo(GuestNicInfo *nicInfo,                      // IN
-                          char buffer[GUESTMSG_MAX_IN_SIZE],          // OUT
-                          size_t *bufferLen)                          // OUT
-{
-   char *buf;
-   char *info;
-   size_t entrySize;
-   DblLnkLst_Links *nicEntryLink;
-
-   ASSERT_ON_COMPILE(sizeof nicInfo->nicInfoProto.version == 4);
-   ASSERT_ON_COMPILE(offsetof(NicInfoProtocol, nicEntrySizeOnWire) == 4);
-   ASSERT_ON_COMPILE(sizeof nicInfo->nicInfoProto.nicEntrySizeOnWire == 4);
-   ASSERT_ON_COMPILE(offsetof(NicInfoProtocol, numNicEntries) == 8);
-   ASSERT_ON_COMPILE(sizeof nicInfo->nicInfoProto.numNicEntries == 4);
-   ASSERT_ON_COMPILE(offsetof(NicInfoProtocol, totalInfoSizeOnWire) == 12);
-   ASSERT_ON_COMPILE(sizeof nicInfo->nicInfoProto.totalInfoSizeOnWire == 4);
-
-   if ((NULL == nicInfo) ||
-       (NULL == buffer ) ||
-       (NULL == bufferLen)) {
-      return FALSE;
-   }
-
-   if (0 == nicInfo->nicInfoProto.numNicEntries) {
-      return FALSE;
-   }
-
-   nicInfo->nicInfoProto.totalInfoSizeOnWire = 0;
-   nicInfo->nicInfoProto.nicEntrySizeOnWire = sizeof(NicEntryProtocol);
-
-   buf = buffer;
-   info = (char *)(&nicInfo->nicInfoProto);
-   entrySize = sizeof nicInfo->nicInfoProto;
-
-   memcpy(buf, info, entrySize);
-   nicInfo->nicInfoProto.totalInfoSizeOnWire += entrySize;
-
-   buf += entrySize;
-
-   DblLnkLst_ForEach(nicEntryLink, &nicInfo->nicList) {
-      NicEntry *nicEntry;
-      DblLnkLst_Links *ipAddrLink;
-      VmIpAddressEntry *ipAddressCur;
-      char *nicEntryBuf = buf;
-
-      nicEntry = DblLnkLst_Container(nicEntryLink, NicEntry, links);
-      nicEntry->nicEntryProto.totalNicEntrySizeOnWire = 0;
-      nicEntry->nicEntryProto.ipAddressSizeOnWire = sizeof(VmIpAddressEntryProtocol);
-
-      info = (char *)(&nicEntry->nicEntryProto);
-
-      entrySize = sizeof nicEntry->nicEntryProto;
-
-       /* to prevent buffer overflow */
-      if (buf + entrySize - buffer < GUESTMSG_MAX_IN_SIZE) {
-         memcpy(buf, info, entrySize);
-         nicEntry->nicEntryProto.totalNicEntrySizeOnWire += entrySize;
-         nicInfo->nicInfoProto.totalInfoSizeOnWire += entrySize;
-      } else {
-         return FALSE;
-      }
-
-      buf += entrySize;
-
-      entrySize = sizeof ipAddressCur->ipEntryProto;
-
-      DblLnkLst_ForEach(ipAddrLink, &nicEntry->ipAddressList) {
-         ipAddressCur = DblLnkLst_Container(ipAddrLink, VmIpAddressEntry, links);
-         ipAddressCur->ipEntryProto.totalIpEntrySizeOnWire = 0;
-         info = (char *)(&ipAddressCur->ipEntryProto);
-
-         if (info) {
-            /* to prevent buffer overflow */
-            if (buf + entrySize - buffer < GUESTMSG_MAX_IN_SIZE) {
-               memcpy(buf, info, entrySize);
-               ipAddressCur->ipEntryProto.totalIpEntrySizeOnWire +=
-                  entrySize;
-               nicEntry->nicEntryProto.totalNicEntrySizeOnWire +=
-                  entrySize;
-               nicInfo->nicInfoProto.totalInfoSizeOnWire +=
-                  entrySize;
-            } else {
-               return FALSE;
-            }
-         }
-
-         /*
-          * Update total size portion that was just calculated.
-          */
-         memcpy(buf + offsetof(VmIpAddressEntryProtocol,
-                               totalIpEntrySizeOnWire),
-                &ipAddressCur->ipEntryProto.totalIpEntrySizeOnWire,
-                sizeof ipAddressCur->ipEntryProto.totalIpEntrySizeOnWire);
-         buf += entrySize;
-      }
-      /*
-       * Update total size portion that was just calculated.
-       */
-      memcpy(nicEntryBuf + offsetof(NicEntryProtocol ,
-                                    totalNicEntrySizeOnWire),
-             &nicEntry->nicEntryProto.totalNicEntrySizeOnWire,
-             sizeof nicEntry->nicEntryProto.totalNicEntrySizeOnWire);
-   }
-
-   *bufferLen = buf + entrySize - buffer;
-
-   /*
-    * Update total size portion that was just calculated.
-    */
-   memcpy(buffer + offsetof(NicInfoProtocol, totalInfoSizeOnWire),
-          &nicInfo->nicInfoProto.totalInfoSizeOnWire,
-          sizeof nicInfo->nicInfoProto.totalInfoSizeOnWire);
-
-   return TRUE;
-}
-
-
 /*
  *----------------------------------------------------------------------------
  *
@@ -1157,49 +877,32 @@ GuestInfoSerializeNicInfo(GuestNicInfo *nicInfo,                      // IN
  */
 
 int
-PrintNicInfo(GuestNicInfo *nicInfo,                    // IN
-             int (*PrintFunc)(const char *, ...))      // IN
+PrintNicInfo(GuestNicList *nicInfo,               // IN
+             int (*PrintFunc)(const char *, ...)) // IN
 {
    int ret = 0;
-   uint32 i = 0;
-   DblLnkLst_Links *nicEntryLink;
-
-
-   ret += PrintFunc("GuestNicInfo: count: %d\n", nicInfo->nicInfoProto.numNicEntries);
-   DblLnkLst_ForEach(nicEntryLink, &nicInfo->nicList) {
-      uint32 j = 0;
-      DblLnkLst_Links *ipAddrLink;
-      NicEntry *nicEntry = DblLnkLst_Container(nicEntryLink,
-                                               NicEntry,
-                                               links);
-      if (nicEntry) {
-         ret += PrintFunc("GuestNicInfo: nic [%d/%d] mac:      %s",
-                          i+1,
-                          nicInfo->nicInfoProto.numNicEntries,
-                          nicEntry->nicEntryProto.macAddress);
-      } else {
-         break;
-      }
+   u_int i = 0;
 
-      DblLnkLst_ForEach(ipAddrLink, &nicEntry->ipAddressList) {
-         VmIpAddressEntry *ipAddress = DblLnkLst_Container(
-                                                       ipAddrLink,
-                                                       VmIpAddressEntry,
-                                                       links);
-
-         if (ipAddress) {
-            ret += PrintFunc("GuestNicInfo: nic [%d/%d] IP [%d/%d]: %s",
-                             i+1,
-                             nicInfo->nicInfoProto.numNicEntries,
-                             j+1,
-                             nicEntry->nicEntryProto.numIPs,
-                             ipAddress->ipEntryProto.ipAddress);
-         } else {
-            break;
-         }
-         j++;
+   ret += PrintFunc("NicInfo: count: %ud\n", nicInfo->nics.nics_len);
+   for (i = 0; i < nicInfo->nics.nics_len; i++) {
+      u_int j;
+      GuestNic *nic = &nicInfo->nics.nics_val[i];
+
+      ret += PrintFunc("NicInfo: nic [%d/%d] mac:      %s",
+                       i+1,
+                       nicInfo->nics.nics_len,
+                       nic->macAddress);
+
+      for (j = 0; j < nic->ips.ips_len; j++) {
+         VmIpAddress *ipAddress = &nic->ips.ips_val[j];
+
+         ret += PrintFunc("NicInfo: nic [%d/%d] IP [%d/%d]: %s",
+                          i+1,
+                          nicInfo->nics.nics_len,
+                          j+1,
+                          nic->ips.ips_len,
+                          ipAddress->ipAddress);
       }
-      i++;
    }
 
    return ret;
@@ -1389,15 +1092,8 @@ GuestInfoClearCache(void)
       gInfoCache.value[i][0] = 0;
    }
 
-   GuestInfo_FreeDynamicMemoryInNicInfo(&gInfoCache.nicInfo);
-
-   gInfoCache.nicInfo.nicInfoProto.numNicEntries = 0;
-   gInfoCache.diskInfo.numEntries = 0;
-
-   if (gInfoCache.diskInfo.partitionList != NULL) {
-      free(gInfoCache.diskInfo.partitionList);
-      gInfoCache.diskInfo.partitionList = NULL;
-   }
+   VMX_XDR_FREE(xdr_GuestNicList, &gInfoCache.nicInfo);
+   memset(&gInfoCache.nicInfo, 0, sizeof gInfoCache.nicInfo);
 }
 
 
@@ -1485,29 +1181,25 @@ GuestInfoServer_SendUptime(void)
  *      initialized with the input parameter
  *
  * Results:
- *      newly allocated NicEntry
+ *      Newly allocated GuestNic, NULL on failure.
  *
  * Side effects:
- *          All linked list in the new entry is initialized. Number of Nic
- *      entries is bumped up by 1.
+ *          Number of Nic entries is bumped up by 1.
  *----------------------------------------------------------------------
  */
 
-NicEntry *
-GuestInfoAddNicEntry(GuestNicInfo *nicInfo,                       // IN/OUT
-                     const char macAddress[MAC_ADDR_SIZE])        // IN
+GuestNic *
+GuestInfoAddNicEntry(GuestNicList *nicInfo,                    // IN/OUT
+                     const char macAddress[NICINFO_MAC_LEN])   // IN
 {
-   NicEntry   *nicEntryCur = NULL;
+   GuestNic *newNic;
 
-   nicEntryCur = Util_SafeCalloc(1, sizeof(*nicEntryCur));
-   DblLnkLst_Init(&nicEntryCur->ipAddressList);
-   DblLnkLst_Init(&nicEntryCur->links);
-   DblLnkLst_LinkLast(&nicInfo->nicList, &nicEntryCur->links);
-
-   Str_Strcpy(nicEntryCur->nicEntryProto.macAddress, macAddress, MAC_ADDR_SIZE);
-   nicInfo->nicInfoProto.numNicEntries++;
+   newNic = XDRUTIL_ARRAYAPPEND(nicInfo, nics, 1);
+   if (newNic != NULL) {
+      Str_Strcpy(newNic->macAddress, macAddress, sizeof newNic->macAddress);
+   }
 
-   return nicEntryCur;
+   return newNic;
 }
 
 
@@ -1516,34 +1208,31 @@ GuestInfoAddNicEntry(GuestNicInfo *nicInfo,                       // IN/OUT
  *
  * GuestInfoAddIpAddress --
  *
- *      Add an IP address entry into NicEntry
+ *      Add an IP address entry into the GuestNic.
  *
  * Results:
- *      Newly allocated IP address Entry
+ *      Newly allocated IP address struct.
  *
  * Side effects:
- *          Linked list in the new IP address entry is initialized.Number
- *      of IP addresses on the NIC is bumped up by 1
+ *      Number of IP addresses on the NIC is bumped up by 1.
  *
  *----------------------------------------------------------------------
  */
 
-VmIpAddressEntry *
-GuestInfoAddIpAddress(NicEntry *nicEntry,               // IN/OUT
+VmIpAddress *
+GuestInfoAddIpAddress(GuestNic *nic,                    // IN/OUT
                       const char *ipAddr,               // IN
                       const uint32 af_type)             // IN
 {
-   VmIpAddressEntry *ipAddressCur;
+   VmIpAddress *ip;
 
-   ipAddressCur = Util_SafeCalloc(1, sizeof *ipAddressCur);
-   DblLnkLst_Init(&ipAddressCur->links);
-   DblLnkLst_LinkLast(&nicEntry->ipAddressList, &ipAddressCur->links);
-   memcpy(ipAddressCur->ipEntryProto.ipAddress, ipAddr, IP_ADDR_SIZE_V2);
-   ipAddressCur->ipEntryProto.addressFamily = af_type;
-
-   nicEntry->nicEntryProto.numIPs++;
+   ip = XDRUTIL_ARRAYAPPEND(nic, ips, 1);
+   if (ip != NULL) {
+      Str_Strcpy(ip->ipAddress, ipAddr, sizeof ip->ipAddress);
+      ip->addressFamily = af_type;
+   }
 
-   return ipAddressCur;
+   return ip;
 }
 
 
@@ -1552,7 +1241,7 @@ GuestInfoAddIpAddress(NicEntry *nicEntry,               // IN/OUT
  *
  * GuestInfoAddSubnetMask --
  *
- *      Add an IPV4 subnet mask to the IpAddressEntry in ASCII form
+ *      Add an IPV4 subnet mask to the IpAddress in ASCII form.
  *
  * Results:
  *      The 'n' bits subnet mask is converted to an ASCII string as a
@@ -1565,7 +1254,7 @@ GuestInfoAddIpAddress(NicEntry *nicEntry,               // IN/OUT
  */
 
 void
-GuestInfoAddSubnetMask(VmIpAddressEntry *ipAddressEntry,       // IN/OUT
+GuestInfoAddSubnetMask(VmIpAddress *ipAddressEntry,            // IN/OUT
                        const uint32 subnetMaskBits)            // IN
 {
    int i;
@@ -1583,8 +1272,8 @@ GuestInfoAddSubnetMask(VmIpAddressEntry *ipAddressEntry,       // IN/OUT
    }
 
    // Convert the hexadecimal value to a string and add to the IpAddress Entry
-   Str_Sprintf(ipAddressEntry->ipEntryProto.subnetMask,
-               sizeof ipAddressEntry->ipEntryProto.subnetMask,
+   Str_Sprintf(ipAddressEntry->subnetMask,
+               sizeof ipAddressEntry->subnetMask,
                "0x%x", subnetMask);
 
    return;
diff --git a/open-vm-tools/lib/guestRpc/Makefile.am b/open-vm-tools/lib/guestRpc/Makefile.am
new file mode 100644 (file)
index 0000000..437635f
--- /dev/null
@@ -0,0 +1,45 @@
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+noinst_LIBRARIES = libGuestRpc.a
+
+libGuestRpc_a_SOURCES =
+libGuestRpc_a_SOURCES += nicinfo_xdr.c
+
+nodist_libGuestRpc_a_SOURCES =
+nodist_libGuestRpc_a_SOURCES += nicinfo.h
+nodist_libGuestRpc_a_SOURCES += nicinfo_xdr.c
+
+CFLAGS += -Wno-unused
+
+CLEANFILES =
+CLEANFILES += nicinfo.h
+CLEANFILES += nicinfo_xdr.c
+
+EXTRA_DIST =
+EXTRA_DIST += nicinfo.x
+
+nicinfo.h: nicinfo.x
+       $(RPCGEN) -h -o $@ nicinfo.x
+       sed 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
+       mv $@.tmp $@
+       mkdir -p $(top_builddir)/include/guestrpc
+       cp $@ $(top_builddir)/include/guestrpc
+
+nicinfo_xdr.c: nicinfo.x nicinfo.h
+       $(RPCGEN) -c -o $@ nicinfo.x
+
diff --git a/open-vm-tools/lib/guestRpc/Makefile.in b/open-vm-tools/lib/guestRpc/Makefile.in
new file mode 100644 (file)
index 0000000..0d65630
--- /dev/null
@@ -0,0 +1,495 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/guestRpc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libGuestRpc_a_AR = $(AR) $(ARFLAGS)
+libGuestRpc_a_LIBADD =
+am_libGuestRpc_a_OBJECTS = nicinfo_xdr.$(OBJEXT)
+nodist_libGuestRpc_a_OBJECTS = nicinfo_xdr.$(OBJEXT)
+libGuestRpc_a_OBJECTS = $(am_libGuestRpc_a_OBJECTS) \
+       $(nodist_libGuestRpc_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libGuestRpc_a_SOURCES) $(nodist_libGuestRpc_a_SOURCES)
+DIST_SOURCES = $(libGuestRpc_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@ -Wno-unused
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libGuestRpc.a
+libGuestRpc_a_SOURCES = nicinfo_xdr.c
+nodist_libGuestRpc_a_SOURCES = nicinfo.h nicinfo_xdr.c
+CLEANFILES = nicinfo.h nicinfo_xdr.c
+EXTRA_DIST = nicinfo.x
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/guestRpc/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/guestRpc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libGuestRpc.a: $(libGuestRpc_a_OBJECTS) $(libGuestRpc_a_DEPENDENCIES) 
+       -rm -f libGuestRpc.a
+       $(libGuestRpc_a_AR) libGuestRpc.a $(libGuestRpc_a_OBJECTS) $(libGuestRpc_a_LIBADD)
+       $(RANLIB) libGuestRpc.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nicinfo_xdr.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+nicinfo.h: nicinfo.x
+       $(RPCGEN) -h -o $@ nicinfo.x
+       sed 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
+       mv $@.tmp $@
+       mkdir -p $(top_builddir)/include/guestrpc
+       cp $@ $(top_builddir)/include/guestrpc
+
+nicinfo_xdr.c: nicinfo.x nicinfo.h
+       $(RPCGEN) -c -o $@ nicinfo.x
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/lib/guestRpc/nicinfo.x b/open-vm-tools/lib/guestRpc/nicinfo.x
new file mode 100644 (file)
index 0000000..a86495a
--- /dev/null
@@ -0,0 +1,64 @@
+/* **********************************************************
+ * Copyright 2008 VMware, Inc.  All rights reserved. -- VMware Confidential
+ * **********************************************************/
+
+/*
+ * nicinfo.x --
+ *
+ *    Definition of the data structures used in the GuestRpc commands to
+ *    provide information about the guest NICs.
+ */
+
+/*
+ * Enumerates the different versions of the messages. Starting at 2, since
+ * version one is legacy code we can't change.
+ */
+enum NicInfoVersion {
+    NIC_INFO_V2 = 2
+};
+
+/*
+ * These are arbitrary limits to avoid possible DoS attacks.
+ * The IP limit is large enough to hold an IP address (either v4 or v6).
+ */
+const NICINFO_MAX_IP_LEN   = 64;
+const NICINFO_MAX_IPS      = 64;
+const NICINFO_MAX_NICS     = 16;
+
+/* MAC Addresses are "AA:BB:CC:DD:EE:FF" = 18 bytes. */
+const NICINFO_MAC_LEN      = 18;
+
+struct VmIpAddress {
+   uint32      addressFamily;
+   Bool        dhcpEnabled;
+   char        ipAddress[NICINFO_MAX_IP_LEN];
+   char        subnetMask[NICINFO_MAX_IP_LEN];
+};
+
+struct GuestNic {
+   char                 macAddress[NICINFO_MAC_LEN];
+   struct VmIpAddress   ips<NICINFO_MAX_IPS>;
+};
+
+/*
+ * This structure is not entirely necessary, but it makes the generated
+ * code nicer to code to.
+ */
+struct GuestNicList {
+   struct GuestNic nics<NICINFO_MAX_NICS>;
+};
+
+/*
+ * This defines the protocol for a "nic info" message. The union allows
+ * us to create new versions of the protocol later by creating new values
+ * in the NicInfoVersion enumeration, without having to change much of
+ * the code calling the (de)serialization functions.
+ *
+ * Since the union doesn't have a default case, de-serialization will fail
+ * if an unknown version is provided on the wire.
+ */
+union GuestNicProto switch (NicInfoVersion ver) {
+case NIC_INFO_V2:
+   struct GuestNicList *nicsV2;
+};
+
index 2737e60030cc85c6ec40155deb508483254f0c3c..cdd0821fd308d86ae73c5c4d00d97b8afa8aa2ce 100644 (file)
@@ -158,6 +158,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index d2c740bb2cd101331d4706571e3c76351be85084..1b5b96bb4f38716fe0653026d868de7df6e4843d 100644 (file)
@@ -142,7 +142,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
  *
  * Results:
  *    0       on success
- *    nonzero if time is not representable on UNIX 
+ *    nonzero if time is not representable on UNIX
  *
  * Side effects:
  *    None
@@ -156,7 +156,7 @@ HgfsConvertFromNtTime(time_t *unixTime, // OUT: Time in UNIX format
 {
    struct timespec tm;
    int ret;
-   
+
    ret = HgfsConvertFromNtTimeNsec(&tm, ntTime);
    *unixTime = tm.tv_sec;
    return ret;
@@ -215,6 +215,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_NO_SPACE;
    case ERROR_NOT_SUPPORTED:
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
+   case ERROR_INVALID_PARAMETER:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
@@ -253,6 +255,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
    case ENAMETOOLONG:
       return HGFS_STATUS_NAME_TOO_LONG;
+   case EPARAMETERNOTSUPPORTED:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
index ee0ba2e806c653ff2c5ad4b199c5366ab52a1f5e..823cd880189928be4f098f9c3948c50261cd1166 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 0691f3d117523ccbc766cb4aabd38b932a5cda4e..fdb9f84f8f786d527d64b31a9e4e29eade2ae115 100644 (file)
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsBd_GetBuf --
+ * HgfsBdGetBufInt --
  *
- *    Get a buffer to send hgfs requests in.
+ *    Allocates a buffer to send a hgfs request in. This can be either a
+ *    HGFS_PACKET_MAX or HGFS_LARGE_PACKET_MAX size buffer depending on the
+ *    external funciton called.
  *
  * Results:
  *    Pointer to a buffer that has the correct backdoor command prefix for 
  *    NULL on failure (not enough memory).
  *
  * Side effects:
- *    None
+ *    None.
  *
  *-----------------------------------------------------------------------------
  */
 
-char *
-HgfsBd_GetBuf(void)
+static char *
+HgfsBdGetBufInt(size_t bufSize)
 {
    /* 
     * Allocate a buffer that is large enough for an HGFS packet and the 
     * synchronous HGFS command, write the command, and return a pointer that 
     * points into the buffer, after the command.
     */
-   size_t len = HGFS_PACKET_MAX + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
+   size_t len = bufSize + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
    char *buf = (char*) calloc(sizeof(char), len);
 
    if (!buf) {
@@ -79,6 +81,51 @@ HgfsBd_GetBuf(void)
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetBuf --
+ *
+ *    Get a buffer of size HGFS_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_PACKET_MAX);
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetLargeBuf --
+ *
+ *    Get a buffer of size HGFS_LARGE_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetLargeBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_LARGE_PACKET_MAX);
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -215,7 +262,7 @@ HgfsBd_Dispatch(RpcOut *out,            // IN: Channel to send on
       return -1;
    }
 
-   ASSERT(replyLen <= HGFS_PACKET_MAX);
+   ASSERT(replyLen <= HGFS_LARGE_PACKET_MAX);
    *packetOut = reply;
    *packetSize = replyLen;
 
index aba25521ef1e078f914c3caaa9094aa0a25dbf78..640a435b16f63009db522311a964f81f45bfa1c1 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index ccb9181db00dfb03490363dd707399dd98c7c293..1982214b77c4d8555421664456bdb879270e9196 100644 (file)
 #define LOGLEVEL_MODULE hgfs
 #include "loglevel_user.h"
 
+/*
+ * Define this to enable an ASSERT on HGFS_STATUS_PROTOCOL_ERROR.
+ * This is useful if client is to be guaranteed to work with the server
+ * without falling back to older protocol versions and to ensure that
+ * clients don't send op value greater than HGFS_OP_MAX.
+ *
+ * NOTE: This flag is only meant to be used while testing. This should
+ *       _always_ be undefined when checking code in.
+ */
+#if 0
+#define HGFS_ASSERT_CLIENT(op) \
+   do { \
+      LOG(4, ("%s: op: %u.\n", __FUNCTION__, op)); \
+      ASSERT(status != HGFS_STATUS_PROTOCOL_ERROR); \
+   } while(0)
+#else
+#define HGFS_ASSERT_CLIENT(op)
+#endif
+
+
+/*
+ * Define this to enable an ASSERT if server gets an op lower than
+ * this value. This is useful if client is to be guaranteed to work with
+ * the server without falling back to older protocol versions.
+ *
+ * NOTE: This flag is only meant to be used while testing. This should
+ *       _always_ be undefined when checking code in.
+ */
+#if 0
+#define HGFS_ASSERT_MINIMUM_OP(op) \
+   do { \
+      LOG(4, ("%s: op received - %u.\n", __FUNCTION__, op)); \
+      ASSERT(op >= HGFS_OP_OPEN_V3); \
+   } while(0)
+#else
+#define HGFS_ASSERT_MINIMUM_OP(op)
+#endif
+
 
 /*
  * This ensures that the hgfs name conversion code never fails on long
@@ -2197,6 +2235,7 @@ HgfsServer_DispatchPacket(char const *packetIn, // IN:     Incoming request pack
    id = request->id;
    op = request->op;
 
+   HGFS_ASSERT_MINIMUM_OP(op);
    if (op < sizeof handlers / sizeof handlers[0]) {
       if (*packetSize >= handlers[op].minReqSize) {
          HgfsInternalStatus internalStatus;
@@ -2215,6 +2254,7 @@ HgfsServer_DispatchPacket(char const *packetIn, // IN:     Incoming request pack
       /* Unknown opcode */
       status = HGFS_STATUS_PROTOCOL_ERROR;
    }
+   HGFS_ASSERT_CLIENT(op);
 
    /*
     * If the status isn't success, set the packetSize to the
@@ -2226,7 +2266,7 @@ HgfsServer_DispatchPacket(char const *packetIn, // IN:     Incoming request pack
       *packetSize = sizeof *reply;
    }
 
-   ASSERT(*packetSize >= sizeof *reply && *packetSize <= HGFS_PACKET_MAX);
+   ASSERT(*packetSize >= sizeof *reply && *packetSize <= HGFS_LARGE_PACKET_MAX);
    reply->id = id;
    reply->status = status;
 }
@@ -2446,16 +2486,18 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
    char const *inEnd;
    char *next;
    char *myBufOut;
+   char *convertedMyBufOut;
    char *out;
    size_t outSize;
    size_t sharePathLen; /* Length of share's path */
+   size_t myBufOutLen;
+   size_t convertedMyBufOutLen;
    int len;
    uint32 pathNameLen;
    char tempBuf[HGFS_PATH_MAX];
    size_t tempSize;
    char *tempPtr;
-   Bool result;
-   char *savedPathSepPos;
+   HgfsInternalStatus result;
    HgfsSharedFolder *share;
    uint32 startIndex = 0;
 
@@ -2512,7 +2554,7 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
    /*
     * See if we are dealing with a "root" share or regular share
     */
-   if (strcmp(sharePath, "") == 0) {
+   if (strlen(sharePath) == 0) {
       size_t prefixLen;
 
       /*
@@ -2596,42 +2638,7 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
    outSize -= pathNameLen;
    out += pathNameLen;
    *out = 0;
-
-   /* Convert file name to proper case as per the policy. */
-   LOG(4, ("HgfsServerGetAccess: %u\n", caseFlags));
-   HgfsServerConvertCase(share, caseFlags, myBufOut);
-
-   /*
-    * Verify that our path has no symlinks. We will only check up to the
-    * parent, because some ops that call us expect to operate on a symlink
-    * final component.
-    */
-   savedPathSepPos = Str_Strrchr(myBufOut, DIRSEPC);
-
-   /*
-    * Since cpName is user-supplied, it's possible that the name was invalid
-    * and did not contain any DIRSEPC characters. If that's the case, fail
-    * gracefully.
-    */
-
-   if (savedPathSepPos == NULL) {
-      LOG(4, ("HgfsServerGetAccess: no valid path separator in the name\n"));
-      nameStatus = HGFS_NAME_STATUS_FAILURE;
-      goto error;
-   }
-
-   /* If the path starts with a DIRSEPC. */
-   if (savedPathSepPos != myBufOut) {
-      *savedPathSepPos = '\0';
-   }
-
-   result = HgfsServerHasSymlink(myBufOut, sharePath);
-   *savedPathSepPos = DIRSEPC;
-   if (result) {
-      LOG(4, ("HgfsServerGetAccess: parent path contains a symlink\n"));
-      nameStatus = HGFS_NAME_STATUS_FAILURE;
-      goto error;
-   }
+   myBufOutLen = out - myBufOut;
 
 #if defined(__APPLE__)
    {
@@ -2642,7 +2649,7 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
        * which is assumed to be in the normalized form C (precomposed).
        */
       if (!CodeSet_Utf8FormCToUtf8FormD(myBufOut,
-                                        out - myBufOut,
+                                        myBufOutLen,
                                         &tempPtr,
                                         &nameLen)) {
          LOG(4, ("HgfsServerGetAccess: unicode conversion to form D failed.\n"));
@@ -2653,22 +2660,57 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
       free(myBufOut);
       LOG(4, ("HgfsServerGetAccess: name is \"%s\"\n", myBufOut));
 
-      /* Save returned pointers for memory trim. */
+      /* Save returned pointers, update buffer length. */
       myBufOut = tempPtr;
       out = tempPtr + nameLen;
+      myBufOutLen = nameLen;
    }
 #endif /* defined(__APPLE__) */
 
+   /* Convert file name to proper case as per the policy. */
+   if (HgfsServerCaseConversionRequired()) {
+      result = HgfsServerConvertCase(sharePath, sharePathLen, myBufOut,
+                                     myBufOutLen, caseFlags,
+                                     &convertedMyBufOut, &convertedMyBufOutLen);
+
+      /*
+       * On success, use the converted file names for further operations.
+       */
+      if (result != 0) {
+         LOG(4, ("HgfsServerGetAccess: HgfsServerConvertCase failed.\n"));
+         nameStatus  = HGFS_NAME_STATUS_FAILURE;
+         goto error;
+      }
+
+      free(myBufOut);
+      myBufOut = convertedMyBufOut;
+      myBufOutLen = convertedMyBufOutLen;
+      ASSERT(myBufOut);
+   }
+
+   /*
+    * Verify that either the path is same as share path or the path until the
+    * parent directory is within the share.
+    *
+    * XXX: Symlink check could become susceptible to TOCTOU (time-of-check, time-of-use)
+    * attack when we move to asynchrounous HGFS operations. We should use the resolved
+    * file path for further file system operations, instead of using the one passed
+    * from the client.
+    */
+   result = HgfsServerHasSymlink(myBufOut, myBufOutLen, sharePath, sharePathLen);
+   if (result != 0) {
+      LOG(4, ("HgfsServerGetAccess: parent path contains a symlink\n"));
+      nameStatus = HGFS_NAME_STATUS_FAILURE;
+      goto error;
+   }
+
    {
       char *p;
-      size_t len;
 
       /* Trim unused memory */
 
-      len = out - myBufOut;
-
       /* Enough space for resulting string + NUL termination */
-      p = realloc(myBufOut, (len + 1) * sizeof *p);
+      p = realloc(myBufOut, (myBufOutLen + 1) * sizeof *p);
       if (!p) {
          LOG(4, ("HgfsServerGetAccess: failed to trim memory\n"));
       } else {
@@ -2676,7 +2718,7 @@ HgfsServerGetAccess(char *cpName,                  // IN:  Cross-platform filena
       }
 
       if (outLen) {
-         *outLen = len;
+         *outLen = myBufOutLen;
       }
    }
 
index ff6169d44fb7d2224a0e600775b45e63506e0933..bbea98ff9cd107fd21cfcd08e5b5ee27a35878e4 100644 (file)
 #include <sys/types.h>
 #include <dirent.h>
 
-#ifndef __FreeBSD__
-#   include <wchar.h>
-#   include <wctype.h>
-#endif
-
 #include "vmware.h"
 #include "hgfsServerPolicy.h" // for security policy
 #include "hgfsServerInt.h"
@@ -57,6 +52,7 @@
 #include "syncMutex.h"
 #include "su.h"
 #include "codeset.h"
+#include "unicodeOperations.h"
 
 #if defined(linux) && !defined(SYS_getdents64)
 /* For DT_UNKNOWN */
@@ -278,17 +274,22 @@ static int HgfsStatFromName(char *fileName,
                            uint32 caseFlags,
                             struct stat *stats);
 
-#ifndef __FreeBSD__
 static int HgfsConvertComponentCase(char *currentComponent,
-                                   size_t dirPathSize,
-                                   char *sharePath);
-
-static int HgfsCaseInsensitiveLookup(char *fileName,
-                                     char *sharePath);
-
-static int HgfsToLower(char *src,
-                       char *dst);
-#endif
+                                    const char *dirPath,
+                                    const char **convertedComponent,
+                                    size_t *convertedComponentSize);
+
+static int HgfsConstructConvertedPath(char **path,
+                                      size_t *pathSize,
+                                      char *convertedPath,
+                                      size_t convertedPathSize);
+
+static int HgfsCaseInsensitiveLookup(const char *sharePath,
+                                     size_t sharePathLength,
+                                     char *fileName,
+                                     size_t fileNameLength,
+                                     char **convertedFileName,
+                                     size_t *convertedFileNameLength);
 
 static Bool HgfsSetattrMode(struct stat *statBuf,
                             HgfsFileAttrInfo *attr,
@@ -1277,142 +1278,146 @@ HgfsGetHiddenAttr(char const *fileName,         // IN:  Input filename
 }
 
 
-#ifndef __FreeBSD__
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsToLower --
- *
- *    Convert string to lower-case independent of the locale.
+ * HgfsConvertComponentCase --
  *
- *    NOTE: fileName needs to be of size PATH_MAX.
+ *    Do a case insensitive search of a directory for the specified entry. If
+ *    a matching entry is found, return it in the convertedComponent argument.
  *
  * Results:
- *    0 on Success, non-zero otherwise.
- *    String str converted to lower-case and placed in dst.
+ *    On Success:
+ *    Returns 0 and the converted component name in the argument convertedComponent.
+ *    The length for the convertedComponent is returned in convertedComponentSize.
+ *
+ *    On Failure:
+ *    Non-zero errno return, with convertedComponent and convertedComponentSize
+ *    set to NULL and 0 respectively.
  *
  * Side effects:
- *    None.
+ *    On success, allocated memory is returned in convertedComponent and needs
+ *    to be freed.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
-HgfsToLower(char *src,    // IN: Input filename
-            char *dst)    // OUT: converted filename
+HgfsConvertComponentCase(char *currentComponent,           // IN
+                         const char *dirPath,              // IN
+                         const char **convertedComponent,  // OUT
+                         size_t *convertedComponentSize)   // OUT
 {
-   char *end = src + strlen(src);
-   wchar_t wc;
-   mbstate_t mbs1, mbs2;
-   size_t ret;
-
-   memset(&mbs1, 0, sizeof(mbstate_t));
-   memset(&mbs2, 0, sizeof(mbstate_t));
-   while (src < end) {
-      ret = mbrtowc(&wc, src, end - src, &mbs1);
-      if (ret == 0) {
-         *dst++ = '\0';
-         src++;
-         continue;
-      }
-      if (ret == (size_t) -2) {
-         LOG(4, ("%s: mbrtowc failed: %d: %s\n", __FUNCTION__, (int)ret, strerror(errno)));
-         return errno;
-      }
-      if (ret == (size_t) -1) {
-         LOG(4, ("%s: mbrtowc failed: %d\n", __FUNCTION__, (int)ret));
-         return errno;
+   struct dirent *dirent;
+   DIR *dir = NULL;
+   char *dentryName;
+   size_t dentryNameLen;
+   char *myConvertedComponent = NULL;
+   size_t myConvertedComponentSize;
+   int ret;
+
+   ASSERT(currentComponent);
+   ASSERT(dirPath);
+   ASSERT(convertedComponent);
+   ASSERT(convertedComponentSize);
+
+   /* Open the specified directory. */
+   dir = opendir(dirPath);
+   if (!dir) {
+      ret = errno;
+      goto exit;
+   }
+
+   /*
+    * Read all of the directory entries. For each one, convert the name
+    * to lower case and then compare it to the lower case component.
+    */
+   while ((dirent = readdir(dir))) {
+      dentryName = dirent->d_name;
+      dentryNameLen = strlen(dentryName);
+
+      if (Unicode_CompareIgnoreCase(currentComponent, dentryName) == 0) {
+         /*
+          * The current directory entry is a case insensitive match to
+          * the specified component. Malloc and copy the current directory entry.
+          */
+         myConvertedComponentSize = dentryNameLen + 1;
+         myConvertedComponent = malloc(myConvertedComponentSize);
+         if (myConvertedComponent == NULL) {
+            ret = errno;
+            LOG(4, ("%s: failed to malloc myConvertedComponent.\n", __FUNCTION__));
+            goto exit;
+         }
+         Str_Strcpy(myConvertedComponent, dentryName, myConvertedComponentSize);
+
+         /* Success. Cleanup and exit. */
+         ret = 0;
+         *convertedComponentSize = myConvertedComponentSize;
+         *convertedComponent = myConvertedComponent;
+         goto exit;
       }
-      src += ret;
-      wc = towlower(wc);
-      ret = wcrtomb(dst, wc, &mbs2);
-      dst += ret;
    }
-   *dst++ = '\0';
-   return 0;
+
+   /* We didn't find a match. Failure. */
+   ret = ENOENT;
+
+exit:
+   if (dir) {
+      closedir(dir);
+   }
+   if (ret) {
+      *convertedComponent = NULL;
+      *convertedComponentSize = 0;
+   }
+   return ret;
 }
 
 
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsConvertComponentCase --
+ * HgfsConstructConvertedPath --
  *
- *    Do a case insensitive search of a directory for the specified entry. If
- *    a matching entry is found, append it to the specified path.
+ *    Expand the passed string and append the converted path.
  *
  * Results:
- *    On Success:
- *    Returns 0 and append a directory separator and the specified entry
- *    (in its original case) to the output path specified.
- *    On Failure:
- *    Non-zero errno return.
+ *    Returns 0 if successful, errno on failure. Note that this
+ *    function cannot return ENOENT.
  *
  * Side effects:
- *    None.
+ *    Reallocs the path.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
-HgfsConvertComponentCase(char *currentComponent, // IN
-                        size_t dirPathSize,     // IN
-                         char *dirPath)          // IN/OUT
+HgfsConstructConvertedPath(char **path,                 // IN/OUT
+                           size_t *pathSize,            // IN/OUT
+                           char *convertedPath,         // IN
+                           size_t convertedPathSize)    // IN
 {
-   struct dirent *dirent;
-   DIR *dir = NULL;
-   char lowerCaseComponent[PATH_MAX] = {0};
-   int ret;
+   char *p;
+   size_t convertedPathLen = convertedPathSize - 1;
 
-   ASSERT(currentComponent);
-   ASSERT(dirPath);
+   ASSERT(path);
+   ASSERT(*path);
+   ASSERT(convertedPath);
+   ASSERT(pathSize);
 
-   /* Convert the component to lower case. */
-   ret = HgfsToLower(currentComponent, lowerCaseComponent);
-   if (ret) {
-      goto exit;
+   p = realloc(*path, *pathSize + convertedPathLen + sizeof(DIRSEPC));
+   if (!p) {
+      int error = errno;
+      LOG(4, ("%s: failed to realloc.\n", __FUNCTION__));
+      return error;
    }
 
-  /* Open the specified directory. */
-  dir = opendir(dirPath);
-  if (!dir) {
-     ret = ENOENT;
-     goto exit;
-  }
-
-  /*
-   * Read all of the directory entries. For each one, convert the name
-   * to lower case and then compare it to the lower case component.
-   */
-  while ((dirent = readdir(dir))) {
-     char lowerCaseFileName[PATH_MAX] = {0};
-     ret = HgfsToLower(dirent->d_name, lowerCaseFileName);
-     if (ret) {
-        continue;
-     }
-     if (Str_Strcmp(lowerCaseComponent, lowerCaseFileName) == 0) {
-       /*
-        * The current directory entry is a case insensitive match to
-        * the specified component. Append it to the output path.
-        */
-       Str_Strcat(dirPath, "/", dirPathSize);
-       Str_Strcat(dirPath, dirent->d_name, dirPathSize);
-
-       /* Success. Cleanup and exit. */
-       ret = 0;
-       goto exit;
-     }
-  }
-
-  /* We didn't find a match. Failure. */
-  ret = ENOENT;
-
-exit:
-  if (dir) {
-     closedir(dir);
-  }
+   *path = p;
+   *pathSize += convertedPathLen + sizeof(DIRSEPC);
 
-  return ret;
+   /* Copy out the converted component to curDir, and free it. */
+   Str_Strncat(p, *pathSize, DIRSEPS, sizeof(DIRSEPS));
+   Str_Strncat(p, *pathSize, convertedPath, convertedPathLen);
+   return 0;
 }
 
 
@@ -1426,96 +1431,155 @@ exit:
  *
  *    NOTE:
  *    shareName is always expected to be a prefix of fileName.
- *    fileName needs to be of size PATH_MAX.
  *
  * Results:
- *    Returns 0 if successful and resolved path for fileName is over-written.
- *    Otherwise returns non-zero errno without affecting fileName.
+ *    Returns 0 if successful and resolved path for fileName is returned in
+ *    convertedFileName with its length in convertedFileNameLength.
+ *    Otherwise returns non-zero errno with convertedFileName and
+ *    convertedFileNameLength set to NULL and 0 respectively.
  *
  * Side effects:
- *    fileName over-written with resolved path when successful.
+ *    On success, allocated memory is returned in convertedFileName and needs
+ *    to be freed.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
-HgfsCaseInsensitiveLookup(char *fileName,      // IN/OUT
-                         char *sharePath)     // IN
+HgfsCaseInsensitiveLookup(const char *sharePath,           // IN
+                          size_t sharePathLength,          // IN
+                          char *fileName,                  // IN
+                          size_t fileNameLength,           // IN
+                          char **convertedFileName,        // OUT
+                          size_t *convertedFileNameLength) // OUT
 {
-  char *currentComponent;
-  char curDir[PATH_MAX] = {0};
-  char *nextComponent = NULL;
-  int error = ENOENT;
-
-  ASSERT(fileName);
-  ASSERT(sharePath);
-
-  currentComponent = fileName + strlen(sharePath);
-  /* Check there is something beyond the share name. */
-  if (*currentComponent == '\0') {
-     /* The fileName is the same as sharePath. Nothing else to do. */
-     return 0;
-  }
-
-  /* Skip a component separator if not in the share path. */
-  if (*currentComponent == DIRSEPC) {
-     currentComponent += 1;
-  }
-
-  Str_Strcpy(curDir, sharePath, sizeof curDir);
-
-  while (TRUE) {
-     /* Get the next component. */
-     nextComponent = strchr(currentComponent, DIRSEPC);
-     if (nextComponent != NULL) {
-       *nextComponent = '\0';
-     }
-
-     /*
-      * Try to match the current component againts one in curDir. If one is
-      * found then append it to curDir.
-      */
-     error = HgfsConvertComponentCase(currentComponent, ARRAYSIZE(curDir),
-                                     curDir);
-     if (error) {
-       /* Restore the path separator if we removed it earlier. */
-       if (nextComponent != NULL) {
-          *nextComponent = DIRSEPC;
-       }
-       break;
-     }
-
-     /* If there is no component after the current one then we are done. */
-     if (nextComponent == NULL) {
-       /* Set success. */
-       error = 0;
-       break;
-     }
-
-     /*
-      * Set the current component pointer to point at the start of the next
-      * component.
-      */
-     currentComponent = nextComponent + 1;
-
-     /*
-      * Restore the directory separator that was removed at the start of
-      * the loop.
-      */
-     *nextComponent = DIRSEPC;
-  }
-
-  /* If the conversion was successful, copy the result out. */
-  if (error == 0) {
-     /* 
-      * XXX: PATH_MAX defeats the purpose of this check. Pass in the
-      *      fileName size.
-      */
-     Str_Strcpy(fileName, curDir, PATH_MAX);
-  }
-  return error;
+   char *currentComponent;
+   char *curDir;
+   char *nextComponent;
+   int error = ENOENT;
+   size_t curDirSize;
+   char *convertedComponent = NULL;
+   size_t convertedComponentSize = 0;
+
+   ASSERT(sharePath);
+   ASSERT(fileName);
+   ASSERT(convertedFileName);
+   ASSERT(fileNameLength >= sharePathLength);
+
+   currentComponent = fileName + sharePathLength;
+   /* Check there is something beyond the share name. */
+   if (*currentComponent == '\0') {
+      /*
+       * The fileName is the same as sharePath. Nothing else to do.
+       * Dup the string and return.
+       */
+      *convertedFileName = strdup(fileName);
+      if (!*convertedFileName) {
+         error = errno;
+         *convertedFileName = NULL;
+         *convertedFileNameLength = 0;
+         LOG(4, ("%s: strdup on fileName failed.\n", __FUNCTION__));
+      } else {
+         *convertedFileNameLength = strlen(fileName);
+      }
+      return 0;
+   }
+
+   /* Skip a component separator if not in the share path. */
+   if (*currentComponent == DIRSEPC) {
+      currentComponent += 1;
+   }
+
+   curDirSize = sharePathLength + 1;
+   curDir = malloc(curDirSize);
+   if (!curDir) {
+      error = errno;
+      LOG(4, ("%s: failed to allocate for curDir\n", __FUNCTION__));
+      goto exit;
+   }
+   Str_Strcpy(curDir, sharePath, curDirSize);
+
+   while (TRUE) {
+      /* Get the next component. */
+      nextComponent = strchr(currentComponent, DIRSEPC);
+      if (nextComponent != NULL) {
+         *nextComponent = '\0';
+      }
+
+      /*
+       * Try to match the current component against the one in curDir.
+       * HgfsConvertComponentCase may return ENOENT. In that case return
+       * the path case-converted uptil now (curDir) and append to it the
+       * rest of the unconverted path.
+       */
+      error = HgfsConvertComponentCase(currentComponent, curDir,
+                                       (const char **)&convertedComponent,
+                                       &convertedComponentSize);
+      /* Restore the path separator if we removed it earlier. */
+      if (nextComponent != NULL) {
+         *nextComponent = DIRSEPC;
+      }
+
+      if (error) {
+         if (error == ENOENT) {
+           int ret;
+            /*
+             * Copy out the components starting from currentComponent. We do this
+             * after replacing DIRSEPC, so all the components following
+             * currentComponent gets copied.
+             */
+            ret = HgfsConstructConvertedPath(&curDir, &curDirSize, currentComponent,
+                                             strlen(currentComponent) + 1);
+            if (ret) {
+               error = ret;
+            }
+         }
+
+         if (error != ENOENT) {
+            free(curDir);
+         }
+         break;
+      }
+
+      /* Expand curDir and copy out the converted component. */
+      error = HgfsConstructConvertedPath(&curDir, &curDirSize, convertedComponent,
+                                         convertedComponentSize);
+      if (error) {
+         free(curDir);
+         free(convertedComponent);
+         break;
+      }
+
+      /* Free the converted component. */
+      free(convertedComponent);
+
+      /* If there is no component after the current one then we are done. */
+      if (nextComponent == NULL) {
+         /* Set success. */
+         error = 0;
+         break;
+      }
+
+      /*
+       * Set the current component pointer to point at the start of the next
+       * component.
+       */
+      currentComponent = nextComponent + 1;
+   }
+
+   /* If the conversion was successful, return the result. */
+   if (error == 0 || error == ENOENT) {
+      *convertedFileName = curDir;
+      *convertedFileNameLength = curDirSize;
+   }
+
+exit:
+   if (error && error != ENOENT) {
+      *convertedFileName = NULL;
+      *convertedFileNameLength = 0;
+   }
+   return error;
 }
-#endif
 
 
 /*
@@ -1525,41 +1589,90 @@ HgfsCaseInsensitiveLookup(char *fileName,      // IN/OUT
  *
  *    Converts the fileName to appropriate case depending upon flags.
  *
- *    NOTE: fileName needs to be of size PATH_MAX.
- *
  * Results:
- *    Returns 0 if successful and converted path for fileName is over-written.
- *    Otherwise returns non-zero integer without affecting fileName.
+ *    Returns 0 if successful and converted path for fileName is returned in
+ *    convertedFileName and it length in convertedFileNameLength.
+ *
+ *    Otherwise returns non-zero integer without affecting fileName with
+ *    convertedFileName and convertedFileNameLength set to NULL and 0
+ *    respectively.
  *
  * Side effects:
- *    fileName over-written with the converted path when successful.
+ *    On success, allocated memory is returned in convertedFileName and needs
+ *    to be freed.
  *
  *-----------------------------------------------------------------------------
  */
 
-int
-HgfsServerConvertCase(HgfsSharedFolder *share,   // IN
-                      uint32 caseFlags,          // IN
-                      char *fileName)            // IN/OUT
+HgfsInternalStatus
+HgfsServerConvertCase(const char *sharePath,              // IN
+                      size_t sharePathLength,             // IN
+                      char *fileName,                     // IN
+                      size_t fileNameLength,              // IN
+                      uint32 caseFlags,                   // IN
+                      char **convertedFileName,           // OUT
+                      size_t *convertedFileNameLength)    // OUT
 {
    int error = 0;
-#ifndef __FreeBSD__
+   ASSERT(sharePath);
    ASSERT(fileName);
+   ASSERT(convertedFileName);
+   ASSERT(convertedFileNameLength);
 
-   LOG(4, ("%s: fileName: #%s# %u\n", __FUNCTION__, fileName, caseFlags));
-   if (!share) {
-      return -1;
-   }
+   *convertedFileName = NULL;
+   *convertedFileNameLength = 0;
 
    if (caseFlags == HGFS_FILE_NAME_CASE_INSENSITIVE) {
-     LOG(4, ("%s: Case insensitive lookup.\n", __FUNCTION__));
-     error = HgfsCaseInsensitiveLookup(fileName, share->path);
+      LOG(4, ("%s: Case insensitive lookup, fileName: %s, flags: %u.\n",
+              __FUNCTION__, fileName, caseFlags));
+      error = HgfsCaseInsensitiveLookup(sharePath, sharePathLength,
+                                        fileName, fileNameLength,
+                                        convertedFileName, convertedFileNameLength);
+      /*
+       * Success or non-ENOENT error code. HgfsCaseInsensitiveLookup can return ENOENT,
+       * and its ok to continue if it is ENOENT.
+       */
+      if (error == ENOENT) {
+         error = 0;
+      }
+      return error;
+   }
+
+   *convertedFileName = strdup(fileName);
+   if (!*convertedFileName) {
+      error = errno;
+      LOG(4, ("%s: strdup on fileName failed.\n", __FUNCTION__));
+   } else {
+      *convertedFileNameLength = fileNameLength;
    }
-#endif
    return error;
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsServerCaseConversionRequired --
+ *
+ *   Determines if the case conversion is required for this platform.
+ *
+ * Results:
+ *   TRUE on Linux / Apple.
+ *
+ * Side effects:
+ *   None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+HgfsServerCaseConversionRequired()
+{
+   return TRUE;
+}
+
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -1567,8 +1680,6 @@ HgfsServerConvertCase(HgfsSharedFolder *share,   // IN
  *
  *    lstat(2) for the file name taking the case-sensitivity options into account.
  *
- *    NOTE: fileName needs to be of size PATH_MAX.
- *
  * Results:
  *    0 when successful, non-zero otherwise.
  *
@@ -1585,6 +1696,9 @@ HgfsStatFromName(char *fileName,          // IN: filename to stat
                  struct stat *stats)      // OUT: file stats
 {
    int error;
+   size_t fileNameLen = strlen(fileName);
+   char *convertedFileName = NULL;
+   size_t convertedFileNameLen;
 
    /* Simple case - plain lookup. */
    errno = 0;
@@ -1598,7 +1712,7 @@ HgfsStatFromName(char *fileName,          // IN: filename to stat
    }
 
    /* If fileName is same as share path, access is denied. */
-   if (!Str_Strncmp(fileName, share->path, strlen(fileName))) {
+   if (!Str_Strncmp(fileName, share->path, fileNameLen)) {
       return EACCES;
    }
 
@@ -1611,17 +1725,22 @@ HgfsStatFromName(char *fileName,          // IN: filename to stat
    }
 
    LOG(4, ("%s: caseFlags: %u\n", __FUNCTION__, caseFlags));
-   error = HgfsServerConvertCase(share, caseFlags, fileName);
+   error = HgfsServerConvertCase(share->path, share->pathLen, fileName,
+                                 fileNameLen, caseFlags,
+                                 &convertedFileName, &convertedFileNameLen);
    if (error) {
       return error;
    }
 
    LOG(4, ("%s: stating %s\n", __FUNCTION__, fileName));
-   error = Posix_Lstat(fileName, stats);
-   if (error < 0) {
-      return errno;
+   error = Posix_Lstat(convertedFileName, stats);
+   if (error) {
+      error = errno;
+      /* Fall through. */
    }
-   return 0;
+
+   free(convertedFileName);
+   return error;
 }
 
 
@@ -2907,6 +3026,8 @@ HgfsServerRead(char const *packetIn, // IN: incoming packet
       replyActualSize = &reply->actualSize;
       reply->reserved = 0;
       replySize = HGFS_REP_PAYLOAD_SIZE_V3(reply) - 1;
+      ASSERT(HGFS_LARGE_PACKET_MAX >= replySize);
+      extra = HGFS_LARGE_PACKET_MAX - replySize;
    } else {
       HgfsRequestRead *request = (HgfsRequestRead *)packetIn;
       HgfsReplyRead *reply = (HgfsReplyRead *)packetOut;
@@ -2917,6 +3038,8 @@ HgfsServerRead(char const *packetIn, // IN: incoming packet
       payload = reply->payload;
       replyActualSize = &reply->actualSize;
       replySize = sizeof *reply - 1;
+      ASSERT(HGFS_PACKET_MAX >= replySize);
+      extra = HGFS_PACKET_MAX - replySize;
    }
 
    LOG(4, ("HgfsServerRead: read fh %u, offset %"FMT64"u, count %u\n",
@@ -2935,9 +3058,6 @@ HgfsServerRead(char const *packetIn, // IN: incoming packet
       return EBADF;
    }
 
-   ASSERT_ON_COMPILE(HGFS_PACKET_MAX >= replySize);
-   extra = HGFS_PACKET_MAX - replySize;
-
    /*
     * requiredSize is user-provided, so this test must be carefully
     * written to prevent wraparounds.
@@ -3244,7 +3364,7 @@ HgfsServerSearchOpen(char const *packetIn, // IN: incoming packet
       dirName = request->dirName.name;
       dirNameLength = request->dirName.length;
       replySearch = &((HgfsReplySearchOpen *)packetOut)->search;
-      replySize = sizeof *request;
+      replySize = sizeof(HgfsReplySearchOpen);
    }
 
    /*
@@ -4203,6 +4323,15 @@ HgfsServerQueryVolume(char const *packetIn, // IN: incoming packet
       requestV3 = (HgfsRequestQueryVolumeV3 *)HGFS_REQ_GET_PAYLOAD_V3(packetIn);
       replyV3 = (HgfsReplyQueryVolumeV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
 
+      /*
+       * We don't yet support file handle for this operation.
+       * Clients should retry using the file name.
+       */
+      if (requestV3->fileName.flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         LOG(4, ("HgfsServerSearchOpen: Doesn't support file handle.\n"));
+         return EPARAMETERNOTSUPPORTED;
+      }
+
       freeBytes = &replyV3->freeBytes;
       totalBytes = &replyV3->totalBytes;
       replyV3->reserved = 0;
@@ -4466,6 +4595,16 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
       targetName = targetNameP->name;
       targetNameLength = targetNameP->length;
 
+      /*
+       * We don't yet support file handle for this operation.
+       * Clients should retry using the file name.
+       */
+      if (requestV3->symlinkName.flags & HGFS_FILE_NAME_USE_FILE_DESC ||
+          targetNameP->flags & HGFS_FILE_NAME_USE_FILE_DESC) {
+         LOG(4, ("HgfsServerSymlinkCreate: Doesn't support file handle.\n"));
+         return EPARAMETERNOTSUPPORTED;
+      }
+
       replyV3 = (HgfsReplySymlinkCreateV3 *)HGFS_REP_GET_PAYLOAD_V3(packetOut);
       replyV3->reserved = 0;
       *packetSize = HGFS_REP_PAYLOAD_SIZE_V3(replyV3);
@@ -4557,20 +4696,37 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
  *
  * HgfsServerHasSymlink --
  *
- *      This function looks at each directory component from left to
- *      right, searching for symlinks after the host share path. If any
- *      component after the share path is found to be a symlink, it returns
- *      TRUE. Otherwise, it returns FALSE. Note that if the file does not
- *      exist, we also return FALSE.
+ *      This function determines if any of the intermediate components of the
+ *      fileName makes references outside the actual shared path. We do not
+ *      check for the last component as none of the server operations follow
+ *      symlinks. Also some ops that call us expect to operate on a symlink
+ *      final component.
+ *
+ *      We use following algorithm. It takes 2 parameters, sharePath and
+ *      fileName, and returns non-zero errno if fileName makes an invalid
+ *      reference. The idea is to resolve both the sharePath and parent
+ *      directory of the fileName. The sharePath is already resolved
+ *      beforehand in HgfsServerPolicyRead. During resolution, we eliminate
+ *      all the ".", "..", and symlinks handled by the realpath(3) libc call.
+ *
+ *      We use parent because last component could be a symlink or a component
+ *      that doesn't exist. After resolving, we determine if sharePath is a
+ *      prefix of fileName.
+ *
+ *      Note that realpath(3) behaves differently on GNU and BSD systems.
+ *      Following table lists the difference:
  *
- *      Sadly, much of this function was copied from File_IsSymlink
- *      because that function won't differentiate between a file that isn't
- *      a symlink and a file that doesn't exist. Since we're checking
- *      every component, we'd definitely like to know when a file doesn't
- *      exist so we may short-circuit out.
+ *                                  GNU realpath          BSD realpath
+ *                            -----------------------  -----------------------
+ *
+ *      "/tmp/existingFile"   "/tmp/existingFile" (0)  "/tmp/existingFile" (0)
+ *       "/tmp/missingFile"   NULL           (ENOENT)  "/tmp/missingFile"  (0)
+ *        "/missingDir/foo"   NULL           (ENOENT)  NULL           (ENOENT)
+ *              In /tmp, ""   NULL           (ENOENT)  "/tmp"              (0)
+ *             In /tmp, "."   "/tmp"              (0)  "/tmp"              (0)
  *
  * Results:
- *      TRUE if the given path has a symlink, FALSE otherwise.
+ *      0 if the given path has a symlink, non-zero errno otherwise.
  *
  * Side effects:
  *      None.
@@ -4578,79 +4734,81 @@ HgfsServerSymlinkCreate(char const *packetIn, // IN: incoming packet
  *----------------------------------------------------------------------
  */
 
-Bool
+HgfsInternalStatus
 HgfsServerHasSymlink(const char *fileName,     // IN
-                     const char *sharePath)    // IN
+                     size_t fileNameLength,     // IN
+                     const char *sharePath,    // IN
+                     size_t sharePathLength)    // IN
 {
-   char *path;
-   char *pathSep;
-   size_t shareLen = 0;
-   size_t pathLen;
-   Bool found = FALSE;
+   char *resolvedFileDirPath = NULL;
+   char *fileDirName = NULL;
+   HgfsInternalStatus status;
 
+   ASSERT(fileName);
    ASSERT(sharePath);
+   ASSERT(sharePathLength <= fileNameLength);
 
-   path = File_FullPath(fileName);
-   if (!path) {
-      goto out;
+   LOG(4, ("%s: fileName: %s, sharePath: %s#\n", __FUNCTION__, fileName, sharePath));
+   /*
+    * Return success if:
+    * - empty fileName or
+    * - sharePath is empty (this is for special root share that allows
+    *   access to entire host) or
+    * - fileName and sharePath are same.
+    */
+   if (fileNameLength == 0 ||
+       sharePathLength == 0 ||
+       Str_Strcmp(sharePath, fileName) == 0) {
+      status = 0;
+      goto exit;
    }
-   pathLen = strlen(path);
 
+   /* Separate out parent directory of the fileName. */
+   File_GetPathName(fileName, &fileDirName, NULL);
    /*
-    * Resolve full path for the share to compare with fileName.
-    * This sharePath can be equal to "" (special case root share that
-    * allows access to the whole host). Normally, we check to ensure that the share
-    * passed in is a prefix of the fileName path. However, that check is meaningless
-    * in the case of the special root share. Only perform the check if sharePath
-    * is non-empty.
+    * File_GetPathName may return an empty string to signify the root of the filesystem.
+    * To simplify subsequent processing, let's convert such empty strings to "/" when
+    * found. See File_GetPathName header comment for details.
     */
-   if (strcmp(sharePath, "") != 0) {
-      char *fullSharePath;
-      fullSharePath = File_FullPath(sharePath);
-      if (!fullSharePath) {
-        LOG(4, ("HgfsServerHasSymlink: File_FullPath failed on sharePath %s\n",
-                sharePath));
-        return FALSE;
+   if (strlen(fileDirName) == 0) {
+      char *p;
+      p = realloc(fileDirName, sizeof(DIRSEPS));
+      if (p == NULL) {
+         status = errno;
+         LOG(4, ("%s: failed to realloc fileDirName.\n", __FUNCTION__));
+         goto exit;
+      } else {
+         fileDirName = p;
+         Str_Strcpy(fileDirName, DIRSEPS, sizeof(DIRSEPS));
       }
-      shareLen = strlen(fullSharePath);
-
-      LOG(4, ("%s: fileName: %s, sharePath: %s, path: %s, fullSharePath: %s\n",
-             __FUNCTION__, fileName, sharePath, path, fullSharePath));
-
-      ASSERT(Str_Strncmp(path, fullSharePath, shareLen < pathLen ?
-                        shareLen : pathLen) == 0);
-      free(fullSharePath);
    }
 
-   /* If fileName is prefix of sharePath, ignore symlinks. */
-   if (shareLen > pathLen) {
-      goto out;
+   /*
+    * Resolve parent directory of fileName.
+    * Use realpath(2) to resolve the parent.
+    */
+   resolvedFileDirPath = Posix_RealPath(fileDirName);
+   if (resolvedFileDirPath == NULL) {
+      status = errno;
+      LOG(4, ("%s: realpath failed: fileDirName: %s: %s\n",
+              __FUNCTION__, fileDirName, strerror(errno)));
+      goto exit;
    }
 
-   /* Start with the first component after the share. */
-   pathSep = path + shareLen;
-
-   while ((pathSep = Str_Strchr(pathSep, DIRSEPC)) != NULL) {
-      *pathSep = '\0';
-
-      if (File_IsSymLink(path)) {
-         found = TRUE;
-         goto out;
-      }
-
-      *pathSep++ = DIRSEPC;
+   /* Resolved parent should match with the shareName. */
+   if (Str_Strncmp(sharePath, resolvedFileDirPath, sharePathLength) != 0) {
+      status = EACCES;
+      LOG(4, ("%s: resolved parent do not match, parent: %s, resolved: %s#\n",
+              __FUNCTION__, fileDirName, resolvedFileDirPath));
+      goto exit;
    }
 
-   /*
-    * We've checked up until every path separator. Now check the last
-    * component.
-    */
-   if (pathLen > shareLen && File_IsSymLink(path)) {
-      found = TRUE;
-   }
-  out:
-   free(path);
-   return found;
+   status = 0;
+
+exit:
+   free(resolvedFileDirPath);
+   free(fileDirName);
+   return status;
 }
 
 
index 7a38fa9ebc70742ef9498062bc43e182240da0cc..b8562e9045cdb1f0b001356d46abde314f6ae5cb 100644 (file)
@@ -157,6 +157,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 5e8bc0a5da8e2d3f8e891f87fb577ffe50922a6d..15146113dc5b86683c286b578d9976a34e1be872 100644 (file)
@@ -66,7 +66,7 @@ HgfsServerManagerRpcInDispatch(char const **result,        // OUT
                                void *clientData)           // Unused
 {
    size_t packetSize;
-   static char packet[HGFS_PACKET_MAX];
+   static char packet[HGFS_LARGE_PACKET_MAX];
 
 
    ASSERT(clientData == NULL);
index 4ed8a1221fccd08a90968df610ab6cf7c862690a..254cc74a57aa13330ada1b0b79038bff99c87c56 100644 (file)
@@ -157,6 +157,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 18ae634201f73a524f77f2d22534eed3c50c95a0..1b7d22efdace9adf93f32a8c04e32d0770509c50 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 726db671b067c4dbeeab69be65c389e5f4d86be3..68874004980ae819e53586c6f4842d3b2f767779 100644 (file)
@@ -227,7 +227,7 @@ ImpersonateOwner(const char *file)          // IN
       if (error == 0) {
          error = ENOENT;
       }
-      Warning("Failed to lookup user with uid: %d. Reason: %s\n", buf.st_uid,
+      Warning("Failed to lookup user with uid: %" FMTUID ". Reason: %s\n", buf.st_uid,
               strerror(error));
       return FALSE;
    }
index 61f4045605fe1a0db64ea8863f08912b92cfc505..ccd9b114a99260df879af3ca8f7bd2f335299fa5 100644 (file)
@@ -1,12 +1,12 @@
 #define BUILD_NUMBER \
-       "build-96374"
+       "build-100027"
 #define BUILD_NUMBER_NUMERIC \
-       96374
+       100027
 #define BUILD_NUMBER_NUMERIC_STRING \
-       "96374"
+       "100027"
 #define PRODUCT_BUILD_NUMBER \
-       "product-build-214"
+       "product-build-231"
 #define PRODUCT_BUILD_NUMBER_NUMERIC \
-       214
+       231
 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \
-       "214"
+       "231"
index fa69e441897dedbaee7ee7997b91cde38dba4255..dbea92fb70fe60a87597201377e730c41f19b7c0 100644 (file)
 
 #endif // __UTF16_H__
 
+
+/*
+ * Use this instead of "UTF-16" to specify UTF-16 in native byte order.
+ */
+
+#define CODESET_NATIVE_UTF16 "UTF-16LE"
+
+
+/*
+ * Flags for conversion functions
+ */
+
 #define CSGTG_NORMAL    0x0000  /* Without any information loss. */
 #define CSGTG_TRANSLIT  0x0001  /* Transliterate unknown characters. */
 #define CSGTG_IGNORE    0x0002  /* Skip over untranslatable characters. */
 
+
 Bool
 CodeSet_Init(void);
 
@@ -343,6 +356,11 @@ CodeSet_GetCurrentCodeSet(void);
 Bool
 CodeSet_IsEncodingSupported(const char *name);
 
+Bool
+CodeSet_Validate(const char *buf,   // IN: the string
+                 size_t size,      // IN: length of string
+                 const char *code); // IN: encoding
+
 
 /*
  *-----------------------------------------------------------------------------
@@ -366,8 +384,8 @@ CodeSet_Utf8ToUtf16(const char *str)  // IN:
 {
    utf16_t *strW;
 
-   if (!CodeSet_Utf8ToUtf16le(str, strlen(str), (char **)(char*) &strW, NULL)) {
-      ASSERT_NOT_IMPLEMENTED(0);
+   if (!CodeSet_Utf8ToUtf16le(str, strlen(str), (char **) &strW, NULL)) {
+      ASSERT_MEM_ALLOC(FALSE);
    }
 
    return strW;
index 92d78099e08dfc4172f7ed1c91a99b6dc548618a..030590edb2fbefd701c08f0598cb82385f16ab36 100644 (file)
@@ -69,6 +69,7 @@
 #define CONFNAME_LOGFILE                  "log.file"
 #define CONFNAME_LOGLEVEL                 "log.level" 
 #define CONFNAME_DISABLEQUERYDISKINFO     "disable-query-diskinfo"
+#define CONFNAME_DISABLETOOLSVERSION      "disable-tools-version"
 /*
  * Without dnd = "true" in tools.conf, Linux DnD won't work. This will only be used 
  * to develop Linux DnD. Once the implementation is done, get rid of this (and the
 #define CONFVAL_RESOLUTION_MIN_WIDTH_DEFAULT  "640"
 #define CONFVAL_RESOLUTION_MIN_HEIGHT_DEFAULT "480"
 
+/*
+ * Tell the tools to show the wireless icon in the guest.
+ */
+
+#define CONFNAME_SHOW_WIRELESS_ICON "wirelessIcon.enable"
+
 /*
  * This is the bin direcotry the user chose while installing the tools
  */
index 950500c5cb4a6295bc398b4da015c9c54d089776..63d32bab20abbb44f6476ab776da30e2f80c93c1 100644 (file)
@@ -60,6 +60,7 @@ typedef struct CPUID81 {
 typedef struct CPUIDSummary {
    CPUID0  id0;
    CPUID1  id1;
+   CPUIDRegs ida;
    CPUID80 id80;
    CPUID81 id81;
    CPUIDRegs id88, id8a;
index 991a3d21fbf24ebca696c4b2de22cd7239b3b154..405c4cfc36f46a703e642a4c2d426c97d804e3c9 100644 (file)
@@ -98,6 +98,7 @@ typedef struct CPClipItem {
  * into cross platform clipboards.
  */
 typedef struct {
+   Bool changed;
    CPClipItem items[CPFORMAT_MAX - 1];
 } CPClipboard;
 
diff --git a/open-vm-tools/lib/include/dndGuest.h b/open-vm-tools/lib/include/dndGuest.h
new file mode 100644 (file)
index 0000000..5fb3ef3
--- /dev/null
@@ -0,0 +1,43 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+
+#ifndef _DND_GUEST_H_
+#define _DND_GUEST_H_
+
+#if defined(_WIN32)
+
+typedef struct {
+   HWND detWnd;
+} UnityDnD;
+
+#else
+
+#include <gtk/gtk.h>
+
+typedef struct {
+   GtkWidget *detWnd;
+   void (*setMode) (Bool);
+} UnityDnD;
+
+
+#endif
+
+
+#endif // _DND_GUEST_H_
+
diff --git a/open-vm-tools/lib/include/dynxdr.h b/open-vm-tools/lib/include/dynxdr.h
new file mode 100644 (file)
index 0000000..e88bef2
--- /dev/null
@@ -0,0 +1,48 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+#ifndef _DYNXDR_H_
+#define _DYNXDR_H_
+
+/*
+ * dynxdr.h --
+ *
+ *    Functions for creating and destroying an XDR stream that is backed
+ *    by a dynamic memory buffer. Uses DynBuf, so requires code using it to
+ *    link lib/misc.
+ *
+ *    This stream only does encoding. For decoding, we generally have data
+ *    already available in the form of a pre-allocated buffer, in which
+ *    case we can use the xdrmem_create() function.
+ *
+ *    Note: xdr_destroy() is a no-op for this stream. Use DynXdr_Destroy()
+ *    instead. Also, XDR_SETPOS and XDR_INLINE are not supported.
+ */
+
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include "vm_basic_types.h"
+
+XDR *DynXdr_Create(XDR *in);
+Bool DynXdr_AppendRaw(XDR *xdrs, const void *buf, size_t len);
+void *DynXdr_AllocGet(XDR *xdrs);
+void *DynXdr_Get(XDR *xdrs);
+void DynXdr_Destroy(XDR *xdrs, Bool release);
+
+#endif /* _DYNXDR_H_ */
+
index cca3a57b63ff92258737f615bdba99849e8ae48e..81142afe2a76d30913f18bb2c5b90573d3840353 100644 (file)
@@ -19,7 +19,7 @@
 /*
  * fileInt.h --
  *
- *     Things internal to the file library.
+ *     Things internal to the file library.
  */
 
 #if !defined(__FILE_INTERNAL_H__)
@@ -64,9 +64,9 @@
 #if !defined(REISERFS_SUPER_MAGIC)
 #define REISERFS_SUPER_MAGIC  0x52654973
 #endif
-#endif // linux
+#endif // linux
 
-#define LGPFX  "FILE:"
+#define LGPFX "FILE:"
 
 #define FILE_TYPE_REGULAR      0
 #define FILE_TYPE_DIRECTORY    1
@@ -121,6 +121,7 @@ typedef struct lock_values
    char         *executionID;
    char         *payload;
    char         *lockType;
+   char         *locationChecksum;
    Unicode      memberName;
    unsigned int lamportNumber;
    uint32       waitTime;
@@ -142,6 +143,8 @@ typedef int FILELOCK_FILE_HANDLE;
 
 EXTERN const char *FileLockGetMachineID(void);
 
+EXTERN char *FileLockGetExecutionID(void);
+
 EXTERN Bool FileLockMachineIDMatch(char *host,
                                    char *second);
 
@@ -151,9 +154,7 @@ EXTERN int FileLockMemberValues(ConstUnicode lockDir,
                                 uint32 size,
                                 LockValues *memberValues);
 
-EXTERN int FileLockHackVMX(const char *machineID,
-                           const char *executionID,
-                           ConstUnicode filePathName);
+EXTERN int FileLockHackVMX(ConstUnicode filePathName);
 
 EXTERN int FileLockOpenFile(ConstUnicode pathName,
                             int flags,
@@ -171,17 +172,13 @@ EXTERN int FileLockWriteFile(FILELOCK_FILE_HANDLE handle,
                              uint32 requestedBytes,
                              uint32 *resultantBytes);
 
-EXTERN void *FileLockIntrinsic(const char *machineID,
-                               const char *executionID,
-                               const char *payload,
-                               ConstUnicode filePathName,
+EXTERN void *FileLockIntrinsic(ConstUnicode filePathName,
                                Bool exclusivity,
                                uint32 msecMaxWaitTime,
+                               const char *payload,
                                int *err);
 
-EXTERN int FileUnlockIntrinsic(const char *machineID,
-                               const char *executionID,
-                               ConstUnicode filePathName,
+EXTERN int FileUnlockIntrinsic(ConstUnicode filePathName,
                                const void *lockToken);
 
 EXTERN Bool FileLockValidOwner(const char *executionID,
index 6be03995c0ffe2b54f79cdddcc10a9d03b573cb6..d2baf984c2d41e714e0fdc8d8e5200c722dd10b0 100644 (file)
@@ -44,6 +44,7 @@
 #define VPX_TEMPLATE_EXTENSION "vmtx"         // VirtualCenter template
 #define TEAM_FILE_EXTENSION "vmtm"            // Foundry VM team
 #define POLICY_FILE_EXTENSION "vmpl"          // ACE/VRM policy file
+#define BUNDLE_FILE_EXTENSION "vmwarevm"      // VM configuration bundle directory
 
 /*
  * Snapshot and related file types.
@@ -52,6 +53,7 @@
 #define MAINMEM_FILE_EXTENSION "vmem"
 #define SUSPEND_FILE_EXTENSION "vmss"
 #define CHECKPOINT_FILE_EXTENSION "vmsn"
+#define VPLAY_FILE_EXTENSION "log"
 #define SNAPSHOT_METADATA_EXTENSION "vmsd"
 #define CHECKPOINT_FILE_EXTENSION_OLD "cpt"   // Obsolete synonym for vmsn
 
index e28459db279b886c9c58deab13b5784da7d502b3..cc80622cfe1a43a301bb3dc83a91bef994e781e8 100644 (file)
 #define _GH_INTEGRATION_H_
 
 #include "dbllnklst.h"
+#include "rpcin.h"
 
 
-DblLnkLst_Links launchMenu;
+extern DblLnkLst_Links launchMenu;
 
 /*
  * If other libraries want to use dynamic adding/removing of event monitoring
@@ -66,6 +67,7 @@ void GHI_Cleanup(void);
 void GHI_InitBackdoor(struct RpcIn *rpcIn);
 void GHI_RegisterCaps(void);
 void GHI_UnregisterCaps(void);
+void GHI_Gather(void);
 
 #endif
 
index e6e382cc0f0d7b21db948ba5255cb0511b291935..9a4eada175f2c6e4d25ca52596841357b791131d 100644 (file)
@@ -101,15 +101,9 @@ GuestApp_GetUnifiedLoopCap(const char *channel); // IN
 Bool
 GuestApp_GetPtrGrabCap(const char *channel); // IN
 
-Bool
-GuestApp_SetVersion(void);
-
 Bool
 GuestApp_Log(const char *s); // IN
 
-uint32
-GuestApp_GetCurrentVersion(void);
-
 char *
 GuestApp_GetInstallPath(void);
 
@@ -125,6 +119,15 @@ GuestApp_GetCmdOutput(const char *cmd); // IN
 Bool
 GuestApp_IsHgfsCapable(void);
 
+Bool
+GuestApp_IsDiskShrinkEnabled(void);
+
+Bool
+GuestApp_IsDiskShrinkCapable(void);
+
+Bool
+GuestApp_DiskShrink(void);
+
 void
 GuestApp_GetPos(int16 *x,  // OUT
                 int16 *y); // OUT
index 1b77b8df74e3561fca32f1a1b5ad305d8805cad2..8325c1e3a173c95b75e56fa9b8df4960b365708f 100644 (file)
 
 #include "dbllnklst.h"
 #include "guestStats.h"
-#include <stdlib.h>     // For inline malloc()/free()
+#include "guestrpc/nicinfo.h"
 
-#define GUEST_INFO_COMMAND_TWO "SetGuestInfo2"
 #define GUEST_INFO_COMMAND "SetGuestInfo"
 #define MAX_VALUE_LEN 100
 #define MAX_NICS     16
 #define MAX_IPS      8     // Max number of IP addresses for a single NIC
 #define MAC_ADDR_SIZE 19
 #define IP_ADDR_SIZE 16
-#define IP_ADDR_SIZE_V2 48 // 40 bytes for address + 3 for netmask + 5 padding
 #define PARTITION_NAME_SIZE MAX_VALUE_LEN
 #define GUESTINFO_TIME_INTERVAL_MSEC 3000  /* time interval in msec */
 
@@ -55,6 +53,7 @@ typedef enum {
    INFO_OS_NAME,
    INFO_UPTIME,
    INFO_MEMORY,
+   INFO_IPADDRESS_V2,
    INFO_MAX
 } GuestInfoType;
 
@@ -63,77 +62,17 @@ typedef enum {
    INFO_IP_ADDRESS_FAMILY_IPV6
 } GuestInfoIPAddressFamilyType;
 
-/*
- * For backward compatibility's sake over wire (from Tools to VMX), new fields
- * in this struct must be added at the end.  THis is the part that goes over wire.
- */
-typedef struct VmIpAddressEntryProtocol {
-   uint32 addressFamily;             /* uint8 should be enough.  However we */
-                                     /* need it to be multiple of 4 bytes */
-                                     /* in order to have the same size on */
-                                     /* different hardware architectures */
-   uint32 dhcpEnabled;   /* This is a boolean.  However we need it to be */
-                         /* multiple of 4 bytes, in order to be the same */
-                         /* on different hardware architecture */
-   char ipAddress[IP_ADDR_SIZE_V2];
-   char subnetMask[IP_ADDR_SIZE_V2];
-   uint32 totalIpEntrySizeOnWire;
-} VmIpAddressEntryProtocol;
-
-typedef struct VmIpAddressEntry {
-   DblLnkLst_Links links;
-   VmIpAddressEntryProtocol ipEntryProto;
-} VmIpAddressEntry;
-
 typedef struct NicEntryV1 {
    unsigned int numIPs;
    char macAddress[MAC_ADDR_SIZE];  // In the format "12-23-34-45-56-67"
    char ipAddress[MAX_IPS][IP_ADDR_SIZE];
 } NicEntryV1;
 
-/*
- * For backward compatibility's sake over wire (from Tools to VMX), new fields
- * in this struct must be added at the end.  THis is the part that goes over wire.
- */
-typedef struct NicEntryProtocol {
-   char macAddress[MAC_ADDR_SIZE];   /* In the format "12-23-34-45-56-67" */
-   char pad[1];                      /* MAC_ADDR_SIZE happens to be 19.  */
-                                     /* Pad it to be multiple of 4 bytes */
-   uint32 numIPs;
-   uint32 ipAddressSizeOnWire;      /* size of struct VmIpAddresses over wire*/
-   uint32 totalNicEntrySizeOnWire;
-} NicEntryProtocol;
-
-typedef struct NicEntry {
-   DblLnkLst_Links links;
-   NicEntryProtocol nicEntryProto;
-   DblLnkLst_Links ipAddressList;
-/* DblLnkLst_Links gatewayList; */
-} NicEntry;
-
 typedef struct GuestNicInfoV1 {
    unsigned int numNicEntries;
    NicEntryV1 nicList[MAX_NICS];
 } GuestNicInfoV1;
 
-
-/*
- * For backward compatibility's sake over wire (from Tools to VMX), new fields
- * in this struct must be added at the end.  This is the part that goes over wire.
- */
-typedef struct NicInfoProtocol {
-   uint32 version;
-   uint32 nicEntrySizeOnWire;      /* length of NicEntry over wire.  Lengths differ */
-                                   /* with different versions. */
-   uint32 numNicEntries;
-   uint32 totalInfoSizeOnWire;
-} NicInfoProtocol;
-
-typedef struct GuestNicInfo {
-   NicInfoProtocol    nicInfoProto;
-   DblLnkLst_Links    nicList;     /* Pointers in it must be initialized to NULL */
-} GuestNicInfo;
-
 typedef
 #include "vmware_pack_begin.h"
 struct _PartitionEntry {
@@ -156,103 +95,12 @@ typedef struct _DiskInfo {
  */
 
 extern Bool GuestInfo_GetFqdn(int outBufLen, char fqdn[]);
-extern Bool GuestInfo_GetNicInfo(GuestNicInfo *nicInfo);
+extern Bool GuestInfo_GetNicInfo(GuestNicList *nicInfo);
 extern Bool GuestInfo_GetDiskInfo(PGuestDiskInfo di);
 extern Bool GuestInfo_GetOSName(unsigned int outBufFullLen,
                                 unsigned int outBufLen, char *osNameFull,
                                 char *osName);
-
-
-/*
- *----------------------------------------------------------------------
- *
- * GuestInfo_FreeDynamicMemoryInNic --
- *
- *      Traverse the link list and free all dynamically allocated memory.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      None.
- *
- *----------------------------------------------------------------------
- */
-
-static INLINE void
-GuestInfo_FreeDynamicMemoryInNic(NicEntry *nicEntry)        // IN
-{
-   VmIpAddressEntry *ipAddressCur;
-   DblLnkLst_Links *sCurrent;
-   DblLnkLst_Links *sNext;
-
-   if (NULL == nicEntry) {
-      return;
-   }
-
-   if (0 == nicEntry->nicEntryProto.numIPs) {
-      return;
-   }
-
-   DblLnkLst_ForEachSafe(sCurrent, sNext, &nicEntry->ipAddressList) {
-
-      ipAddressCur = DblLnkLst_Container(sCurrent,
-                                         VmIpAddressEntry,
-                                         links);
-
-      DblLnkLst_Unlink1(&ipAddressCur->links);
-      free(ipAddressCur);
-   }
-
-   DblLnkLst_Init(&nicEntry->ipAddressList);
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * GuestInfo_FreeDynamicMemoryInNicInfo --
- *
- *      Free all dynamically allocated memory in the struct pointed to
- *      by nicInfo.
- *
- * Results:
- *      None.
- *
- * Side effects:
- *      None.
- *
- *----------------------------------------------------------------------
- */
-
-static INLINE void
-GuestInfo_FreeDynamicMemoryInNicInfo(GuestNicInfo *nicInfo)      // IN
-{
-   NicEntry *nicEntryCur = NULL;
-   DblLnkLst_Links *sCurrent;
-   DblLnkLst_Links *sNext;
-
-   if (NULL == nicInfo) {
-      return;
-   }
-
-   if (0 == nicInfo->nicInfoProto.numNicEntries) {
-      return;
-   }
-
-   DblLnkLst_ForEachSafe(sCurrent, sNext, &nicInfo->nicList) {
-      nicEntryCur = DblLnkLst_Container(sCurrent,
-                                        NicEntry,
-                                        links);
-
-      GuestInfo_FreeDynamicMemoryInNic(nicEntryCur);
-      DblLnkLst_Unlink1(&nicEntryCur->links);
-      free (nicEntryCur);
-   }
-
-   DblLnkLst_Init(&nicInfo->nicList);
-}
-
+extern int GuestInfo_GetSystemBitness(void);
 
 #endif // _GUEST_INFO_H_
 
index 861e3861477216bbaaff3c08b412ce2772a7659f..fb3502c0d0a22a8a7a94a53cd58d98e3f7bf6d99 100644 (file)
 
 
 #include "guestInfo.h"
+#include "guestrpc/nicinfo.h"
 
 Bool GuestInfoGetFqdn(int outBufLen, char fqdn[]);
-Bool GuestInfoGetNicInfo(GuestNicInfo *nicInfo);
+Bool GuestInfoGetNicInfo(GuestNicList *nicInfo);
 void GuestInfoMemset(void * mem, int value, unsigned int size);
 Bool GuestInfoGetDiskInfo(PGuestDiskInfo di);
 Bool GuestInfoGetOSName(unsigned int outBufFullLen, unsigned int outBufLen,
                         char *osNameFull, char *osName);
-int GuestInfo_GetSystemBitness(void);
 Bool GuestInfo_PerfMon(struct GuestMemInfo *vmStats);
 
-NicEntry *GuestInfoAddNicEntry(GuestNicInfo *nicInfo,
-                               const char macAddress[MAC_ADDR_SIZE]);
-VmIpAddressEntry *GuestInfoAddIpAddress(NicEntry *nicEntry,
-                                        const char *ipAddr,
-                                        const uint32 af_type);
-void GuestInfoAddSubnetMask(VmIpAddressEntry *ipAddressEntry,
+GuestNic *GuestInfoAddNicEntry(GuestNicList *nicInfo,
+                               const char macAddress[NICINFO_MAC_LEN]);
+VmIpAddress *GuestInfoAddIpAddress(GuestNic *nic,
+                                   const char *ipAddr,
+                                   const uint32 af_type);
+void GuestInfoAddSubnetMask(VmIpAddress *ipAddressEntry,
                             const uint32 subnetMaskBits);
 
-NicEntry *GuestInfoFindMacAddress(GuestNicInfo *nicInfo, const char *macAddress);
-
-
 #endif
index fe2ae73501ef22cd09e42540a2a2f06e732d0acc..5fe308c699531f068ce3b701158e000d8daab764 100644 (file)
@@ -43,8 +43,8 @@ struct GuestMemInfo {
    uint64 memInactive;        /* Physical memory inactive in Kb (cold pages) */
    uint64 swapInRate;         /* Memory swapped out in Kb / sec. */
    uint64 swapOutRate;        /* Memory swapped out in Kb / sec. */
-   uint64 ioInRate;           /* Amount of I/O in in blocks / sec. */
-   uint64 ioOutRate;          /* Amount of I/O out in blocks / sec. */
+   uint64 ioInRate;           /* Amount of I/O in Kb / sec. */
+   uint64 ioOutRate;          /* Amount of I/O out in Kb / sec. */
    uint64 hugePagesTotal;     /* Total number of huge pages. */
    uint64 hugePagesFree;      /* Available number of huge pages. */
    uint64 memPinned;          /* Unreclaimable physical memory in 4K page size. */
index cd8e177ac7db4f7b53169430a1fc3bd1cd51bc8f..59690b6e8b7a7cec5660e441020a9afe4f5e4cef 100644 (file)
 #include "includeCheck.h"
 #include "vm_assert.h"
 
+/*
+ * Maximum number of pages to transfer to/from the HGFS server for V3 protocol
+ * operations that support large requests/replies, e.g. reads and writes.
+ */
+#define HGFS_LARGE_IO_MAX_PAGES  15
 
 /*
  * Maximum allowed packet size in bytes. All hgfs code should be made
  */
 #define HGFS_PACKET_MAX 6144
 
+/*
+ * The HGFS_LARGE_PACKET_MAX size is used to allow guests to make
+ * read / write requests of sizes larger than HGFS_PACKET_MAX. The larger size
+ * can only be used with server operations that are specified to be large packet
+ * capable in hgfsProto.h.
+ */
+#define HGFS_LARGE_PACKET_MAX ((4096 * HGFS_LARGE_IO_MAX_PAGES) + 2048)
+
+/* Maximum number of bytes to read or write to a hgfs server in a single packet. */
+#define HGFS_IO_MAX 4096
+
+/* Maximum number of bytes to read or write to a V3 server in a single hgfs packet. */
+#define HGFS_LARGE_IO_MAX (HGFS_LARGE_IO_MAX_PAGES * 4096)
 
 /*
  * Open mode
@@ -113,8 +131,8 @@ typedef enum {
  * error codes travelled from hgfsProto.h to hgfs.h in that same change. Worse,
  * we GA'ed a product (Server 1.0) this way.
  *
- * XXX: I've reversed the order because otherwise new HGFS clients working 
- * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR 
+ * XXX: I've reversed the order because otherwise new HGFS clients working
+ * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR
  * when the server sent them HGFS_STATUS_INVALID_NAME. This was a problem
  * the Linux client converts HGFS_STATUS_GENERIC_ERROR to -EIO, which causes
  * HgfsLookup to fail unexpectedly (normally HGFS_STATUS_INVALID_NAME is
@@ -136,6 +154,7 @@ typedef enum {
    HGFS_STATUS_NO_SPACE,
    HGFS_STATUS_OPERATION_NOT_SUPPORTED,
    HGFS_STATUS_NAME_TOO_LONG,
+   HGFS_STATUS_INVALID_PARAMETER,
 } HgfsStatus;
 
 /*
@@ -150,9 +169,9 @@ typedef enum {
  * the command and the space into some buffer that is then sent over the
  * backdoor.
  *
- * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest 
- * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates 
- * back to when the host was to send raw TCL code to the guest (TCL Out == 
+ * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest
+ * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates
+ * back to when the host was to send raw TCL code to the guest (TCL Out ==
  * TCLO).
  *
  * In Guest --> Host RPC traffic, the guest endpoint is RpcOut and the host
@@ -161,11 +180,11 @@ typedef enum {
 
 /*
  * When an RPCI listener registers for this command, HGFS requests are expected
- * to be synchronously sent from the guest and replies are expected to be 
+ * to be synchronously sent from the guest and replies are expected to be
  * synchronously returned.
- * 
- * When an RpcIn listener registers for this command, requests are expected to 
- * be asynchronously sent from the host and synchronously returned from the 
+ *
+ * When an RpcIn listener registers for this command, requests are expected to
+ * be asynchronously sent from the host and synchronously returned from the
  * guest.
  *
  * In short, an endpoint sending this command is sending a request whose reply
@@ -175,7 +194,7 @@ typedef enum {
 #define HGFS_SYNC_REQREP_CLIENT_CMD HGFS_SYNC_REQREP_CMD " "
 #define HGFS_SYNC_REQREP_CLIENT_CMD_LEN (sizeof HGFS_SYNC_REQREP_CLIENT_CMD - 1)
 
-/* 
+/*
  * This is just for the sake of macro naming. Since we are guaranteed
  * equal command lengths, defining command length via a generalized macro name
  * will prevent confusion.
index 5a94d6c1370ef8b60e7c582b39fe1820b2e4b9ad..cda7b55478358dee632ccffc36c7c0225942ac29 100644 (file)
@@ -29,6 +29,8 @@
 
 char *HgfsBd_GetBuf(void);
 
+char *HgfsBd_GetLargeBuf(void);
+
 void HgfsBd_PutBuf(char *);
 
 RpcOut *HgfsBd_GetChannel(void);
index defbcc3096e304e449147ecf9a2c03c421d25ba0..dcff362d4fc8b050880a41c2f74668801513ac89 100644 (file)
@@ -660,7 +660,10 @@ struct HgfsReplyRead {
 HgfsReplyRead;
 
 
-/* Version 3 of HgfsReplyOpen */
+/*
+ * Version 3 of HgfsRequestRead.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
 
 typedef
 #include "vmware_pack_begin.h"
@@ -711,6 +714,11 @@ struct HgfsReplyWrite {
 #include "vmware_pack_end.h"
 HgfsReplyWrite;
 
+/*
+ * Version 3 of HgfsRequestWrite.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
+
 typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestWriteV3 {
index 18cc25aba71587f2e628f67fefc5b662423a53dd..10a6ff0741965e9768f443a1450eb6973e33dcf5 100644 (file)
@@ -628,14 +628,22 @@ HgfsServerPlatformInit(void);
 void
 HgfsServerPlatformDestroy(void);
 
-Bool
-HgfsServerHasSymlink(const char *fileName,      // IN
-                     const char *sharePath);    // IN
+HgfsInternalStatus
+HgfsServerHasSymlink(const char *fileName,      // IN: fileName to be checked
+                     size_t fileNameLength,     // IN
+                     const char *sharePath,     // IN: share path in question
+                     size_t sharePathLen);      // IN
+HgfsInternalStatus
+HgfsServerConvertCase(const char *sharePath,             // IN: share path in question
+                      size_t sharePathLength,            // IN
+                      char *fileName,                    // IN: filename to be looked up
+                      size_t fileNameLength,             // IN
+                      uint32 caseFlags,                  // IN: case-sensitivity flags
+                      char **convertedFileName,          // OUT: case-converted filename
+                      size_t *convertedFileNameLength);  // OUT
 
-int
-HgfsServerConvertCase(HgfsSharedFolder *share,  // IN
-                      uint32 caseFlags,         // IN
-                      char *fileName);          // IN / OUT
+Bool
+HgfsServerCaseConversionRequired(void);
 
 /* All oplock-specific functionality is defined here. */
 #ifdef HGFS_OPLOCKS
index 0d61eaed44301ab45b2b7bbbb572a5fc8660894e..57a4911fbe07ac2e0b66f5b3c52c2f571f65ab15 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * hgfsUtil.h --
- * 
+ *
  *    Utility functions and macros used by hgfs.
  */
 
 
 #   if defined(__linux__) && defined(__KERNEL__)
 #      include "driver-config.h"
-#      include <linux/time.h> // for time_t and timespec  
+#      include <linux/time.h> // for time_t and timespec
     /* Include time.h in userspace code, but not in Solaris kernel code. */
 #   elif defined(__FreeBSD__) && defined(_KERNEL)
     /* Do nothing. */
 #   elif defined(__APPLE__) && defined(KERNEL)
 #      include <sys/time.h>
-#   else 
+#   else
 #      include <time.h>
-#   endif 
+#   endif
 #   include "vm_basic_types.h"
 #   if !defined(_STRUCT_TIMESPEC) &&   \
        !defined(_TIMESPEC_DECLARED) && \
@@ -71,15 +71,27 @@ struct timespec {
     typedef DWORD HgfsInternalStatus;
 #endif
 
-/* 
- * Unfortunately, we need a catch-all "generic error" to use with 
+/*
+ * Unfortunately, we need a catch-all "generic error" to use with
  * HgfsInternalStatus, because there are times when cross-platform code needs
- * to return its own errors along with errors from platform specific code. 
+ * to return its own errors along with errors from platform specific code.
  *
  * Using -1 should be safe because we expect our platforms to use zero as
  * success and a positive range of numbers as error values.
  */
-#define HGFS_INTERNAL_STATUS_ERROR -1
+#define HGFS_INTERNAL_STATUS_ERROR (-1)
+
+#ifndef _WIN32
+/*
+ * This error code is used to notify the client that some of the parameters passed
+ * (e.g. file handles) are not supported. Clients are expected to correct
+ * the parameter (e.g. pass file name instead) and retry.
+ *
+ * Note that this error code is artificially made up and in future may conflict
+ * with an "official" error code when added.
+ */
+#define EPARAMETERNOTSUPPORTED  (MAX_INT32 - 1)
+#endif
 
 /*
  * FreeBSD (pre-6.0) does not define EPROTO, so we'll define our own error code.
index bb24df1e3011afac462f458a2c015ffa87dcf9e1..881c2ae7ad0751cbe32509cbfc595ca33db6bb2c 100644 (file)
@@ -110,7 +110,7 @@ Bool Hostinfo_GetPCFrequency(uint64 *pcHz);
 Bool Hostinfo_GetMhzOfProcessor(int32 processorNumber, 
                                uint32 *currentMhz, uint32 *maxMhz);
 uint64 Hostinfo_SystemIdleTime(void);
-Bool Hostinfo_GetAllCpuid(CPUIDResult* info);
+Bool Hostinfo_GetAllCpuid(CPUIDQuery *query);
 #endif
 void Hostinfo_LogLoadAverage(void);
 Bool Hostinfo_GetLoadAverage(uint32 *l);
index 1ad4ab28c70ee944ae7d16a6edeb4faf54fef190..529764c48fddb972b3d98c1ef4f3467be164a266 100644 (file)
    LOGLEVEL_VAR(vmxnet), \
    LOGLEVEL_VAR(pciPassthru), \
    LOGLEVEL_VAR(vnet), \
+   LOGLEVEL_VAR(netPkt), \
    LOGLEVEL_VAR(macfilter), \
    LOGLEVEL_VAR(macbw), \
    LOGLEVEL_VAR(macfi), \
    LOGLEVEL_VAR(devicePowerOn), \
    LOGLEVEL_VAR(vmxvmdbCallbacks), \
    LOGLEVEL_VAR(guestInstall), \
-
+   LOGLEVEL_VAR(vmUpsellController), \
 
 LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER);
 
index b28e5e898e4ea38816f3b6f5cfdef22c2b0c86ea..e202de6463d47aac4da0b9bd9103ff721bab04c4 100644 (file)
 #define __NETUTIL_H__
 
 #include "vm_basic_types.h"
-#include "guestInfo.h"
+
+#if !defined(N_PLAT_NLM)
+#  include "guestInfo.h"
+#endif
 
 #ifdef _WIN32
 #include <windows.h>
@@ -47,7 +50,9 @@ typedef FIXED_INFO_W2KSP1 *PFIXED_INFO;
 
 char *NetUtil_GetPrimaryIP(void);
 
-NicEntry *NetUtil_GetPrimaryNicEntry(void);
+#if !defined(N_PLAT_NLM)
+GuestNic *NetUtil_GetPrimaryNic(void);
+#endif
 
 #ifdef _WIN32
 DWORD NetUtil_LoadIpHlpApiDll(void);
index 72466f9473de7a67968e7077b3f4111ac0c72fab..a5b9de795f43d660a18168335169771e3f651194 100644 (file)
@@ -76,9 +76,7 @@ EXTERN int  Panic_GetCoreDumpFlags(void);
 /*
  * Extra debugging information that Panic module knows how to dump.
  */
-#ifdef _WIN32
 EXTERN void Panic_DumpGuiResources(void);
-#endif
 
 
 #endif //  _PANIC_H_
index 3b234ca3d4e39b89b6ff3aa5d513f79eb9360f20..6001fe70e0e718f940ad047712987d82375d2c90 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "vm_basic_types.h"
 #include "unicodeTypes.h"
+#include "unicodeBase.h"
 #include "codeset.h"
 
 /*
@@ -84,6 +85,15 @@ long Posix_Pathconf(ConstUnicode pathName, int name);
 #endif
 
 #if !defined(_WIN32)
+/*
+ * These Windows APIs actually work with non-ASCII (MBCS) strings.
+ * Make them NULL wrappers for all other platforms.
+ */
+#define Posix_GetHostName gethostname
+#define Posix_GetHostByName gethostbyname
+#define Posix_GetAddrInfo getaddrinfo
+#define Posix_GetNameInfo getnameinfo
+
 void *Posix_Dlopen(ConstUnicode pathName, int flags);
 
 int Posix_Utime(ConstUnicode pathName, const struct utimbuf *times);
@@ -121,22 +131,25 @@ struct passwd *Posix_Getpwuid(uid_t uid);
 
 #if !defined(sun)
 int Posix_Statfs(ConstUnicode pathName, struct statfs *statfsbuf);
-int Posix_Setenv(ConstUnicode name, ConstUnicode value, int overWrite);
+#endif
 
+int Posix_Setenv(ConstUnicode name, ConstUnicode value, int overWrite);
 
-#if !defined(__FreeBSD__)
 int Posix_Getpwnam_r(ConstUnicode name, struct passwd *pw,
                      char *buf, size_t size, struct passwd **ppw);
 int Posix_Getpwuid_r(uid_t uid, struct passwd *pw,
                      char *buf, size_t size, struct passwd **ppw);
 struct passwd *Posix_Getpwent(void);
+#if !defined(sun)
 int Posix_GetGroupList(ConstUnicode user, gid_t group, gid_t *groups,
                        int *ngroups);
+#endif
 struct group *Posix_Getgrnam(ConstUnicode name);
-int Posix_Getgrnam_r(ConstUnicode name, struct group *gr, 
+int Posix_Getgrnam_r(ConstUnicode name, struct group *gr,
                  char *buf, size_t size, struct group **pgr);
 
-#if !defined(__APPLE__)
+#if !defined(sun)
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
 int Posix_Mount(ConstUnicode source, ConstUnicode target,
                 const char *filesystemtype, unsigned long mountflags,
                const void *data);
@@ -146,17 +159,378 @@ struct mntent *Posix_Getmntent(FILE *fp);
 struct mntent *Posix_Getmntent_r(FILE *fp, struct mntent *m,
                                  char *buf, int size);
 
-#endif // !defined(__APPLE__)
-#endif // !defined(__FreeBSD__)
+#endif // !defined(__APPLE__) && !defined(__FreeBSD__)
 #else  // !defined(sun)
 int Posix_Getmntent(FILE *fp, struct mnttab *mp);
 
 #endif // !defined(sun)
 #endif // !defined(N_PLAT_NLM)
+#else  // !define(_WIN32)
+
+
+#if defined(_WINSOCKAPI_) || defined(_WINSOCK2API_)
+/*
+ *----------------------------------------------------------------------
+ *
+ * Posix_GetHostName --
+ *
+ *      Wrapper for gethostname().
+ *
+ * Results:
+ *      0    Success
+ *      -1   Error
+ *
+ * Side effects:
+ *      On error, error code returned by WSAGetLastError() is updated.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE int
+Posix_GetHostName(Unicode name, // OUT
+                  int namelen)  // IN
+{
+   char *nameMBCS = (char *)Util_SafeMalloc(namelen);
+   Unicode nameUTF8;
+   int retval;
+
+   ASSERT(name);
+
+   retval = gethostname(nameMBCS, namelen);
+
+   if (retval == 0) {
+      nameUTF8 = Unicode_Alloc(nameMBCS, STRING_ENCODING_DEFAULT);
+      if (!Unicode_CopyBytes(name, nameUTF8, namelen, NULL, STRING_ENCODING_UTF8)) {
+         retval = -1;
+         WSASetLastError(WSAEFAULT);
+      }
+      Unicode_Free(nameUTF8);
+   }
+
+   free(nameMBCS);
+   
+   return retval;
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Posix_GetHostByName --
+ *
+ *      Wrapper for gethostbyname().
+ *
+ *      XXX TODO: It returns a pointer to static data and is not thread-
+ *      safe.  Better switch to Posix_GetAddrInfo.
+ *
+ * Results:
+ *      NULL    Error
+ *      !NULL   Pointer to hostent structure
+ *
+ * Side effects:
+ *      On error, error code returned by WSAGetLastError() is updated.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE struct hostent*
+Posix_GetHostByName(ConstUnicode name)  // IN
+{
+   static struct hostent shostent = {0};  // XXX: use TLS to be thread-safe
+   char *nameMBCS;
+   struct hostent *hostentMBCS;
+   struct hostent *ret = NULL;
+
+   ASSERT(name);
+
+   nameMBCS = (char *)Unicode_GetAllocBytes(name, STRING_ENCODING_DEFAULT);
+
+   if (nameMBCS != NULL) {
+      hostentMBCS = gethostbyname(nameMBCS);
+
+      if (hostentMBCS != NULL) {
+         Unicode_Free(shostent.h_name);
+         if (shostent.h_aliases) {
+            Unicode_FreeList(shostent.h_aliases, -1);
+            shostent.h_aliases = NULL;
+         }
+
+         shostent.h_name = Unicode_Alloc(hostentMBCS->h_name,
+                                         STRING_ENCODING_DEFAULT);
+         if (hostentMBCS->h_aliases) {
+            shostent.h_aliases = Unicode_AllocList(hostentMBCS->h_aliases, -1,
+                                                   STRING_ENCODING_DEFAULT);
+         }
+         shostent.h_addrtype = hostentMBCS->h_addrtype;
+         shostent.h_length = hostentMBCS->h_length;
+         shostent.h_addr_list = hostentMBCS->h_addr_list;
+         ret = &shostent;
+      }
+   } else {
+      /* There has been an error converting from UTF-8 to local encoding. */
+      WSASetLastError(WSANO_RECOVERY);
+   }
+
+   return ret;
+}
+#endif // defined(_WINSOCKAPI_) || defined(_WINSOCK2API_)
+
+#ifdef _WS2TCPIP_H_
+typedef int (WINAPI *GetAddrInfoWFnType)(PCWSTR pNodeName, PCWSTR pServiceName,
+                                         const struct addrinfo *pHints,
+                                         struct addrinfo **ppResult);
+typedef int (WINAPI *GetNameInfoWFnType)(const SOCKADDR *pSockaddr,
+                                         socklen_t SockAddrLength,
+                                        PWCHAR pNodeBuffer,
+                                        DWORD NodeBufferSize,
+                                        PWCHAR pServiceBuffer,
+                                        DWORD ServiceBufferSize,
+                                        INT flags);
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Posix_GetAddrInfo --
+ *
+ *      Wrapper for getaddrinfo().
+ *
+ * Results:
+ *      0       Success
+ *      != 0    Error
+ *
+ * Side effects:
+ *      On error, error code returned by WSAGetLastError() is updated.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE int
+Posix_GetAddrInfo(ConstUnicode nodename,        // IN
+                  ConstUnicode servname,        // IN
+                  const struct addrinfo *hints, // IN
+                  struct addrinfo **res)        // OUT
+{
+   HMODULE hWs2_32;
+   int retval;
+   char *nodenameMBCS;
+   char *servnameMBCS;
+   GetAddrInfoWFnType GetAddrInfoWFn;
+
+   ASSERT(nodename || servname);
+   ASSERT(res);
+
+   hWs2_32 = LoadLibraryA("ws2_32");
+
+   if (hWs2_32) {
+      /*
+       * If the unicode version of getaddrinfo exists, use it.  The string
+       * conversion required is between UTF-8 and UTF-16 encodings.  Note
+       * that struct addrinfo and ADDRINFOW are identical except for the
+       * fields ai_canonname (char * vs. PWSTR) and ai_next (obviously).
+       */
+
+      GetAddrInfoWFn = (GetAddrInfoWFnType)GetProcAddress(hWs2_32, "GetAddrInfoW");
+
+      if (GetAddrInfoWFn) {
+         utf16_t *nodenameW = Unicode_GetAllocUTF16(nodename);
+         utf16_t *servnameW = Unicode_GetAllocUTF16(servname);
+
+         retval = (*GetAddrInfoWFn)(nodenameW, servnameW, hints, res);
+
+         if (retval == 0) {
+            struct addrinfo *cur;
+            utf16_t *tempW;
+
+            for (cur = *res; cur != NULL; cur = cur->ai_next) {
+               if (cur->ai_canonname) {
+                  tempW = (utf16_t *)cur->ai_canonname;
+                  cur->ai_canonname = Unicode_AllocWithUTF16(tempW);
+                  free(tempW);
+               }
+            }
+         }
+
+         free(nodenameW);
+         free(servnameW);
+
+         goto exit;
+      }
+   }
+
+   /*
+    * We did not find the unicode version of getaddrinfo, so we need to
+    * convert strings to and from the local encoding.
+    */
+
+   nodenameMBCS = (char *)Unicode_GetAllocBytes(nodename, STRING_ENCODING_DEFAULT);
+   servnameMBCS = (char *)Unicode_GetAllocBytes(servname, STRING_ENCODING_DEFAULT);
+
+   retval = getaddrinfo(nodenameMBCS, servnameMBCS, hints, res);
+
+   if (retval == 0) {
+      struct addrinfo *cur;
+      char *temp;
+
+      for (cur = *res; cur != NULL; cur = cur->ai_next) {
+         if (cur->ai_canonname) {
+            temp = cur->ai_canonname;
+            cur->ai_canonname = Unicode_Alloc(temp, STRING_ENCODING_DEFAULT);
+            free(temp);
+         }
+      }
+   }
+
+   free(nodenameMBCS);
+   free(servnameMBCS);
+
+exit:
+   if (hWs2_32) {
+      FreeLibrary(hWs2_32);
+   }
+
+   return retval;
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Posix_GetNameInfo --
+ *
+ *      Wrapper for getnameinfo().
+ *
+ * Results:
+ *      0       Success
+ *      != 0    Error
+ *
+ * Side effects:
+ *      On error, error code returned by WSAGetLastError() is updated.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE int
+Posix_GetNameInfo(const struct sockaddr *sa,    // IN
+                  socklen_t salen,              // IN
+                  Unicode host,                 // OUT
+                  DWORD hostlen,                // IN
+                  Unicode serv,                 // OUT
+                  DWORD servlen,                // IN
+                  int flags)                    // IN
+{
+   HMODULE hWs2_32;
+   int retval;
+   char *hostMBCS = NULL;
+   char *servMBCS = NULL;
+   utf16_t *hostW = NULL;
+   utf16_t *servW = NULL;
+   Unicode hostUTF8 = NULL;
+   Unicode servUTF8 = NULL;
+   GetNameInfoWFnType GetNameInfoWFn;
+
+   hWs2_32 = LoadLibraryA("ws2_32");
+
+   if (hWs2_32) {
+      /*
+       * If the unicode version of getnameinfo exists, use it.  The string
+       * conversion required is between UTF-8 and UTF-16 encodings.
+       */
+
+      GetNameInfoWFn = (GetNameInfoWFnType)GetProcAddress(hWs2_32, "GetNameInfoW");
+
+      if (GetNameInfoWFn) {
+         if (host) {
+            hostW = (utf16_t *)Util_SafeMalloc(hostlen * sizeof *hostW);
+         }
+         if (serv) {
+            servW = (utf16_t *)Util_SafeMalloc(servlen * sizeof *servW);
+         }
+
+         retval = (*GetNameInfoWFn)(sa, salen, hostW, hostlen, servW, servlen, flags);
+
+         if (retval == 0) {
+            if (host) {
+               hostUTF8 = Unicode_AllocWithUTF16(hostW);
+
+               if (!Unicode_CopyBytes(host, hostUTF8, hostlen, NULL,
+                                      STRING_ENCODING_UTF8)) {
+                  retval = EAI_MEMORY;
+                  WSASetLastError(WSA_NOT_ENOUGH_MEMORY);
+                  goto exit;
+               }
+            }
+            if (serv) {
+               servUTF8 = Unicode_AllocWithUTF16(servW);
+
+               if (!Unicode_CopyBytes(serv, servUTF8, servlen, NULL,
+                                      STRING_ENCODING_UTF8)) {
+                  retval = EAI_MEMORY;
+                  WSASetLastError(WSA_NOT_ENOUGH_MEMORY);
+                  goto exit;
+               }
+            }
+         }
+         
+         goto exit;
+      }
+   }
+
+   /*
+    * We did not find the unicode version of getnameinfo, so we need to
+    * convert strings to and from the local encoding.
+    */
+
+   if (host) {
+      hostMBCS = (char *)Util_SafeMalloc(hostlen * sizeof *hostMBCS);
+   }
+   if (serv) {
+      servMBCS = (char *)Util_SafeMalloc(servlen * sizeof *servMBCS);
+   }
+
+   retval = getnameinfo(sa, salen, hostMBCS, hostlen, servMBCS, servlen, flags);
+
+   if (retval == 0) {
+      if (host) {
+         hostUTF8 = Unicode_Alloc(hostMBCS, STRING_ENCODING_DEFAULT);
+
+         if (!Unicode_CopyBytes(host, hostUTF8, hostlen, NULL,
+                                STRING_ENCODING_UTF8)) {
+            retval = EAI_MEMORY;
+            WSASetLastError(WSA_NOT_ENOUGH_MEMORY);
+            goto exit;
+         }
+      }
+      if (serv) {
+         servUTF8 = Unicode_Alloc(servMBCS, STRING_ENCODING_DEFAULT);
+
+         if (!Unicode_CopyBytes(serv, servUTF8, servlen, NULL,
+                                STRING_ENCODING_UTF8)) {
+            retval = EAI_MEMORY;
+            WSASetLastError(WSA_NOT_ENOUGH_MEMORY);
+            goto exit;
+         }
+      }
+   }
+
+exit:
+   if (hWs2_32) {
+      FreeLibrary(hWs2_32);
+      free(hostW);
+      free(servW);
+   }
+   free(hostMBCS);
+   free(servMBCS);
+   free(hostUTF8);
+   free(servUTF8);
+
+   return retval;
+}
+#endif // ifdef _WS2TCPIP_H_
 #endif // !define(_WIN32)
 
-#if defined(CURRENT_IS_UTF8) && \
-    !defined(UNICODE_BUILDING_POSIX_WRAPPERS)
+#if (defined(VMX86_SERVER) || defined(__APPLE__)) && \
+   !defined(UNICODE_BUILDING_POSIX_WRAPPERS)
 /*
  * ESX and MacOS X are UTF-8 environments so these functions can be
  * "defined away" - the POSIX wrapper call can be directly mapped to the
diff --git a/open-vm-tools/lib/include/resolution.h b/open-vm-tools/lib/include/resolution.h
new file mode 100644 (file)
index 0000000..fdca510
--- /dev/null
@@ -0,0 +1,68 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * resolution.h --
+ *
+ *    Library for the guest resolution and topology fit/resize capabilities.
+ *    This library handles its own RPC callbacks, and it's intended to more
+ *    or less operate independently of the client application.
+ */
+
+#ifndef _LIB_RESOLUTION_H_
+#define _LIB_RESOLUTION_H_
+
+#define INCLUDE_ALLOW_USERLEVEL
+#define INCLUDE_ALLOW_DISTRIBUTE
+#include "includeCheck.h"
+
+#include "vmware.h"
+#include "rpcin.h"
+
+
+/*
+ * Data types
+ */
+
+/*
+ * Argument to be passed to Resolution_Init().  Users of the X11 backend
+ * should provide a Display *.  Not sure what users of Mac OS X will need
+ * to provide, if anything.
+ */
+#if defined(RESOLUTION_X11)
+#   include <X11/Xlib.h>
+#   undef Bool
+typedef Display *       InitHandle;
+
+#elif defined(__APPLE__)
+typedef void *          InitHandle;
+#else
+#   error Unknown display backend
+#endif
+
+
+/*
+ * Global functions
+ */
+
+Bool Resolution_Init(const char *tcloChannel, InitHandle handle);
+Bool Resolution_Register(RpcIn *rpcIn);
+Bool Resolution_RegisterCapability(void);
+Bool Resolution_UnregisterCapability(void);
+
+#endif // ifndef _LIB_RESOLUTION_H_
index 1a8d9ca736cf88bf4073ddffbfd43fed4c1de381..fbc68e9113f628d4a7719d2d0b1aaed5a75a20b1 100644 (file)
 
 #include "dbllnklst.h"
 
+/* Helper macro for porting old callbacks that currently use RpcIn_SetRetVals. */
+#define RPCIN_SETRETVALS(data, val, retVal)                                \
+   RpcIn_SetRetVals((char const **) &(data)->result, &(data)->resultLen,   \
+                    (val), (retVal))
+
 typedef void RpcIn_ErrorFunc(void *clientData, char const *status);
 
 typedef struct RpcIn RpcIn;
 
+/* Data passed to new-style RpcIn callbacks. */
+typedef struct RpcInData {
+   /* Data from the host's RPC request. */
+   const char *name;
+   const char *args;
+   size_t argsSize;
+   /* Data to be returned to the host. */
+   char *result;
+   size_t resultLen;
+   Bool freeResult;
+   /* Client data. */
+   void *clientData;
+} RpcInData;
+
+
 /*
- * Type for RpcIn callbacks.  The command is the prefix of message and
- * that result may be NULL.  The callback function is responsible for
+ * Type for RpcIn callbacks. The callback function is responsible for
  * allocating memory for the result string.
  */
+typedef Bool (*RpcIn_Callback)(RpcInData *data);
+
+
+/*
+ * Type for old RpcIn callbacks. Don't use this anymore - this is here
+ * for backwards compatibility.
+ */
 typedef Bool
-(*RpcIn_Callback)(char const **result,     // OUT
-                  size_t *resultLen,       // OUT
-                  const char *name,        // IN
-                  const char *args,        // IN
-                  size_t argsSize,         // IN
-                  void *clientData);       // IN
+(*RpcIn_CallbackOld)(char const **result,     // OUT
+                     size_t *resultLen,       // OUT
+                     const char *name,        // IN
+                     const char *args,        // IN
+                     size_t argsSize,         // IN
+                     void *clientData);       // IN
 
 RpcIn *RpcIn_Construct(DblLnkLst_Links *eventQueue);
 void RpcIn_Destruct(RpcIn *in);
@@ -53,10 +79,18 @@ Bool RpcIn_start(RpcIn *in, unsigned int delay,
                  RpcIn_ErrorFunc *errorFunc, void *errorData);
 Bool RpcIn_restart(RpcIn *in);
 Bool RpcIn_stop(RpcIn *in);
+
+/*
+ * Don't use this function anymore - it's here only for backwards compatibility.
+ * Use RpcIn_RegisterCallbackEx() instead.
+ */
 void RpcIn_RegisterCallback(RpcIn *in, const char *name,
-                            RpcIn_Callback callback, void *clientData);
+                            RpcIn_CallbackOld callback, void *clientData);
+
+void RpcIn_RegisterCallbackEx(RpcIn *in, const char *name,
+                              RpcIn_Callback callback, void *clientData);
 void RpcIn_UnregisterCallback(RpcIn *in, const char *name);
 unsigned int RpcIn_SetRetVals(char const **result, size_t *resultLen,
                               const char *resultVal, Bool retVal);
-
 #endif /* __RPCIN_H__ */
+
index 237ba44ede9faaa5ea6b58a48a8f03dac2a515b9..7b22d05c6c3d8ce1e350daf6a9b1b5ce62e59416 100644 (file)
@@ -244,6 +244,11 @@ UTF8(ConstUnicode str)
    return Unicode_GetUTF8(str);
 }
 
+/*
+ * Compute the number of bytes in a string.
+ */
+ssize_t Unicode_LengthInBytes(const void *buffer, StringEncoding encoding);
+
 /*
  * Gets the number of UTF-16 code units in the NUL-terminated UTF-16 array.
  */
@@ -301,7 +306,12 @@ UnicodeIndex Unicode_LengthInCodeUnits(ConstUnicode str);
 static INLINE Bool
 Unicode_IsEmpty(ConstUnicode str)  // IN:
 {
-   return Unicode_LengthInCodeUnits(str) == 0;
+#ifdef SUPPORT_UNICODE_OPAQUE
+   NOT_IMPLEMENTED();
+#else
+   ASSERT(str != NULL);
+   return str[0] == '\0';
+#endif
 }
 
 
index 38a0231b1ff2a59ae5e08207acc7c4b5340da210..9b6ca1617ecceab149a45a7f840c5c9d811eb3a2 100644 (file)
@@ -34,7 +34,8 @@ extern "C" {
 
 Unicode UnicodeAllocInternal(const void *buffer,
                              ssize_t lengthInBytes,
-                             StringEncoding encoding);
+                             StringEncoding encoding,
+                            Bool strict);
 Unicode UnicodeAllocStatic(const char *asciiBytes,
                            Bool unescape);
 
index 2a4cdfab8058b0389a0d7d6052e6ef1b71b420d7..93dce166232885064528f6a0ec1cc7d31bb89e6b 100644 (file)
@@ -277,7 +277,9 @@ Unicode_CompareIgnoreCase(ConstUnicode str1, // IN
 /*
  *-----------------------------------------------------------------------------
  *
+ * UnicodeEndsWith --
  * Unicode_EndsWith --
+ * Unicode_EndsWithIgnoreCase --
  *
  *      Tests if 'str' ends with 'suffix'.
  *
@@ -291,10 +293,10 @@ Unicode_CompareIgnoreCase(ConstUnicode str1, // IN
  */
 
 static INLINE Bool
-Unicode_EndsWith(ConstUnicode str,    // IN
-                 ConstUnicode suffix) // IN
+UnicodeEndsWith(ConstUnicode str,    // IN
+                ConstUnicode suffix, // IN
+                Bool ignoreCase)     // IN
 {
-#ifdef SUPPORT_UNICODE_OPAQUE
    UnicodeIndex strLength = Unicode_LengthInCodeUnits(str);
    UnicodeIndex suffixLength = Unicode_LengthInCodeUnits(suffix);
    UnicodeIndex offset = strLength - suffixLength;
@@ -312,16 +314,23 @@ Unicode_EndsWith(ConstUnicode str,    // IN
                                suffix,
                                0,
                                suffixLength,
-                               FALSE) == 0;
-#else
-   size_t strLength = strlen(str);
-   size_t suffixLength = strlen(suffix);
+                               ignoreCase) == 0;
+}
 
-   if (suffixLength > strLength) {
-      return FALSE;
-   }
-   return strcmp(str + strLength - suffixLength, suffix) == 0;
-#endif
+
+static INLINE Bool
+Unicode_EndsWith(ConstUnicode str,    // IN
+                 ConstUnicode suffix) // IN
+{
+   return UnicodeEndsWith(str, suffix, FALSE);
+}
+
+
+static INLINE Bool
+Unicode_EndsWithIgnoreCase(ConstUnicode str,    // IN
+                           ConstUnicode suffix) // IN
+{
+   return UnicodeEndsWith(str, suffix, TRUE);
 }
 
 
@@ -686,7 +695,9 @@ Unicode_Replace(ConstUnicode destination,
 /*
  *-----------------------------------------------------------------------------
  *
+ * UnicodeStartsWith --
  * Unicode_StartsWith --
+ * Unicode_StartsWithIgnoreCase --
  *
  *      Tests if 'str' starts with 'prefix'.
  *
@@ -700,10 +711,10 @@ Unicode_Replace(ConstUnicode destination,
  */
 
 static INLINE Bool
-Unicode_StartsWith(ConstUnicode str,    // IN
-                   ConstUnicode prefix) // IN
+UnicodeStartsWith(ConstUnicode str,    // IN
+                  ConstUnicode prefix, // IN
+                  Bool ignoreCase)     // IN
 {
-#ifdef SUPPORT_UNICODE_OPAQUE
    UnicodeIndex strLength = Unicode_LengthInCodeUnits(str);
    UnicodeIndex prefixLength = Unicode_LengthInCodeUnits(prefix);
 
@@ -720,10 +731,23 @@ Unicode_StartsWith(ConstUnicode str,    // IN
                                prefix,
                                0,
                                prefixLength,
-                               FALSE) == 0;
-#else
-   return strncmp(str, prefix, strlen(prefix)) == 0;
-#endif
+                               ignoreCase) == 0;
+}
+
+
+static INLINE Bool
+Unicode_StartsWith(ConstUnicode str,    // IN
+                   ConstUnicode prefix) // IN
+{
+   return UnicodeStartsWith(str, prefix, FALSE);
+}
+
+
+static INLINE Bool
+Unicode_StartsWithIgnoreCase(ConstUnicode str,    // IN
+                             ConstUnicode prefix) // IN
+{
+   return UnicodeStartsWith(str, prefix, TRUE);
 }
 
 
index 71f3bc55452ede36e47d2bfbd85a3a07c9076a94..ad54129abda7d7b7bab204ccdb801ef9adee7930 100644 (file)
@@ -74,12 +74,14 @@ enum {
    UNICODE_INDEX_NOT_FOUND = -1
 };
 
+
 /*
  * Encodings passed to convert encoded byte strings to and from
  * Unicode.
  *
  * Keep this enum synchronized with ICU_ENCODING_LIST in unicodeICU.cc!
  */
+
 typedef enum {
    STRING_ENCODING_FIRST,
 
@@ -89,15 +91,16 @@ typedef enum {
     * If you don't know what to use for bytes in a new system, use
     * STRING_ENCODING_UTF8.
     */
+
    STRING_ENCODING_UTF8 = STRING_ENCODING_FIRST,
 
-   STRING_ENCODING_UTF16,    // Host-endian UTF-16.
    STRING_ENCODING_UTF16_LE, // Little-endian UTF-16.
    STRING_ENCODING_UTF16_BE, // Big-endian UTF-16.
+   STRING_ENCODING_UTF16_XE, // UTF-16 with BOM.
 
-   STRING_ENCODING_UTF32,    // Host-endian UTF-32.
    STRING_ENCODING_UTF32_LE, // Little-endian UTF-32.
    STRING_ENCODING_UTF32_BE, // Big-endian UTF-32.
+   STRING_ENCODING_UTF32_XE, // UTF-32 with BOM.
 
    /*
     * Legacy byte string encodings that only support a subset of Unicode.
@@ -106,6 +109,7 @@ typedef enum {
    /*
     * Latin encodings
     */
+
    STRING_ENCODING_US_ASCII,
    STRING_ENCODING_ISO_8859_1,
    STRING_ENCODING_ISO_8859_2,
@@ -126,6 +130,7 @@ typedef enum {
    /*
     * Chinese encodings
     */
+
    STRING_ENCODING_GB_18030,
    STRING_ENCODING_BIG_5,
    STRING_ENCODING_BIG_5_HK,
@@ -136,6 +141,7 @@ typedef enum {
    /*
     * Japanese encodings
     */
+
    STRING_ENCODING_SHIFT_JIS,
    STRING_ENCODING_EUC_JP,
    STRING_ENCODING_ISO_2022_JP,
@@ -145,12 +151,14 @@ typedef enum {
    /*
     * Korean encodings
     */
+
    STRING_ENCODING_EUC_KR,
    STRING_ENCODING_ISO_2022_KR,
 
    /*
     * Windows encodings
     */
+
    STRING_ENCODING_WINDOWS_1250,
    STRING_ENCODING_WINDOWS_1251,
    STRING_ENCODING_WINDOWS_1252,
@@ -377,7 +385,6 @@ typedef enum {
    STRING_ENCODING_WINDOWS_710,
    STRING_ENCODING_WINDOWS_720,
    STRING_ENCODING_WINDOWS_737,
-   STRING_ENCODING_WINDOWS_775,
    STRING_ENCODING_WINDOWS_875,
    STRING_ENCODING_WINDOWS_1361,
    STRING_ENCODING_WINDOWS_10000,
@@ -408,7 +415,6 @@ typedef enum {
    STRING_ENCODING_WINDOWS_20108,
    STRING_ENCODING_WINDOWS_20269,
    STRING_ENCODING_WINDOWS_20833,
-   STRING_ENCODING_WINDOWS_20838,
    STRING_ENCODING_WINDOWS_20949,
    STRING_ENCODING_WINDOWS_21025,
    STRING_ENCODING_WINDOWS_21027,
@@ -445,8 +451,16 @@ typedef enum {
    /*
     * The environment-specified "default" encoding for this process.
     */
+
    STRING_ENCODING_DEFAULT = -1,
    STRING_ENCODING_UNKNOWN = -2,
+
+   /*
+    * UTF-16 and UTF-32 in native byte order.
+    */
+
+   STRING_ENCODING_UTF16 = STRING_ENCODING_UTF16_LE,
+   STRING_ENCODING_UTF32 = STRING_ENCODING_UTF32_LE,
 } StringEncoding;
 
 
index fcc64ac16cf2d3d2b88dcd58c3493e22458c3748..5378e21c57968413f2b320923f9094406c7d8ebb 100644 (file)
@@ -26,6 +26,7 @@
 #define _UNITY_H_
 
 #include <string.h>
+#include "dndGuest.h"
 #include "dbllnklst.h"
 #include "guestApp.h"
 #include "dynbuf.h"
@@ -74,7 +75,7 @@ typedef struct UnityVirtualDesktopArray {
 void Unity_Init(GuestApp_Dict *conf, int* blockedWnd);
 void Unity_InitBackdoor(struct RpcIn *rpcIn);
 Bool Unity_IsSupported(void);
-void Unity_SetActiveDnDDetWnd(int detWnd);
+void Unity_SetActiveDnDDetWnd(UnityDnD *state);
 void Unity_Exit(void);
 void Unity_Cleanup(void);
 void Unity_RegisterCaps(void);
index f34697592cce1da8b7c2f1474676cf77c658a5d5..a71fe016ef2f28ea577fb820d80d610864bceb92 100644 (file)
@@ -144,7 +144,9 @@ void Util_LogWrapper(void *ignored, const char *fmt, ...);
 
 int Util_CompareDotted(const char *s1, const char *s2);
 
-
+#if defined(__linux__)
+void Util_PrintLoadedObjects(void *addr_inside_exec);
+#endif
 
 /*
  * In util_shared.h
index b9de2e37e104c9c64046ef750a876c7bff1c47d3..a9f70b38156875a0809cc1f2d5a7ac0f9bcb4261 100644 (file)
@@ -241,6 +241,7 @@ enum {
    VIX_E_DISK_INVALID_CONNECTION                = 16054,
    VIX_E_DISK_ENCODING                          = 16061,
    VIX_E_DISK_CANTREPAIR                        = 16062,
+   VIX_E_DISK_INVALIDDISK                       = 16063,
 
    /* Crypto Library Errors */
    VIX_E_CRYPTO_UNKNOWN_ALGORITHM               = 17000,
@@ -613,6 +614,7 @@ enum {
       VIX_POWERSTATE_RESETTING       = 0x0080,
       VIX_POWERSTATE_BLOCKED_ON_MSG  = 0x0100,
       VIX_POWERSTATE_PAUSED          = 0x0200,
+      VIX_POWERSTATE_RESUMING        = 0x0800,
 };
 
 typedef int VixToolsState;
index 260581adfd0ebcdf084fb14d3b319f8d15e9b227..f4c5e61e34141819de2a2265a6d8ffa76e9cad68 100644 (file)
@@ -81,9 +81,6 @@ VixError VixToolsGetUserTmpDir(void *userToken,
                                char **tmpDirPath);
 
 Bool VixToolsUserIsMemberOfAdministratorGroup(VixCommandRequestHeader *requestMsg);
-
-VixError VixToolsValidateUserCredentials(const char *domainAndUsername,
-                                         const char *password);
 #endif // _WIN32
 
 #if IMPLEMENT_SOCKET_MGR
index 72fdbc9f5d23b42a3d6a322b63997e2c9c97be77..d6cfa24d15c178b6fdd39834e830647b44a3980a 100644 (file)
@@ -65,7 +65,6 @@ typedef struct GuestOsStateChangeCmd {
 #define TOOLS_UPGRADER_NAME       "tools-upgrader"
 #define TOOLS_SSO_NAME            "tools-sso"
 #define TOOLS_HGFS_NAME           "tools-hgfs"
-#define TOOLS_TRAY_NAME           "tools-tray"
 
 /*
  * Option strings
@@ -87,10 +86,10 @@ typedef struct GuestOsStateChangeCmd {
  * and then through the backdoor to the tools. Also, leave
  * some room for ipc msg overhead. [greg]
  */
-#define MAX_SELECTION_BUFFER_LENGTH             (1 << 16) - 100
+#define MAX_SELECTION_BUFFER_LENGTH             ((1 << 16) - 100)
 
-#define VMWARE_DONT_EXCHANGE_SELECTIONS                -2
-#define VMWARE_SELECTION_NOT_READY             -1
+#define VMWARE_DONT_EXCHANGE_SELECTIONS                (-2)
+#define VMWARE_SELECTION_NOT_READY             (-1)
 
 #define VMWARE_GUI_AUTO_GRAB                   0x001
 #define VMWARE_GUI_AUTO_UNGRAB                 0x002
index 4e2f061b045b1f2350bfcc958a84bb6ead6fa870..f6490d43eaa1fedb9a3310f044decafd6ef84d6c 100644 (file)
@@ -303,42 +303,42 @@ Mul64x3264(uint64 multiplicand, uint32 multiplier, uint32 shift)
     * smart enough, at least in the version we are currently using.
     */
    if (shift < 32) {
-      asm("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
-          "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
-          "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
-          "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
-          "shrdl %1, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // use in shrdl requires it to be a register
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
+              "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
+              "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
+              "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
+              "shrdl %1, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // use in shrdl requires it to be a register
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    } else {
-      asm("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
-          "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
-          "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
-          "shrl  %%cl, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // could be "=&rm" but "m" is slower
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
+              "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
+              "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
+              "shrl  %%cl, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // could be "=&rm" but "m" is slower
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    }
    return result;
 }
@@ -415,38 +415,38 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result;
    uint32 tmp1, tmp2;
    // ASSERT(shift >= 0 && shift < 64);
-  
+
    /* Written and tested by mann, checked by dbudko and hpreg */
    /* XXX hpreg suggested some improvements that we haven't converged on yet */
-   asm("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
-       "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
-       "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
-       "jl    0f\n\t"             // Go if negative
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "jmp   1f\n"
-    "0:\n\t"
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
-    "1:\n\t"
-       "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
-       "mov   %%edx, %1\n\t"      // Save hi(p2)
-       "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
-       "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
-       "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
-       "cmpl  $32, %%ecx\n\t"     // shift < 32?
-       "jl    2f\n\t"             // Go if so
-       "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
-       "mov   %1, %%edx\n\t"
-       "shrdl %%edx, %%eax\n\t"
-       "sarl  %%cl, %%edx\n\t"
-       "jmp   3f\n"
-    "2:\n\t"
-       "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
-       "shrdl %1, %%edx\n"
-    "3:\n\t"
-       : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
-       : "0" (multiplicand), "rm" (multiplier), "c" (shift)
-       : "cc");
+   __asm__("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
+           "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
+           "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
+           "jl    0f\n\t"             // Go if negative
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "jmp   1f\n"
+        "0:\n\t"
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
+        "1:\n\t"
+           "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
+           "mov   %%edx, %1\n\t"      // Save hi(p2)
+           "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
+           "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
+           "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
+           "cmpl  $32, %%ecx\n\t"     // shift < 32?
+           "jl    2f\n\t"             // Go if so
+           "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
+           "mov   %1, %%edx\n\t"
+           "shrdl %%edx, %%eax\n\t"
+           "sarl  %%cl, %%edx\n\t"
+           "jmp   3f\n"
+        "2:\n\t"
+           "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
+           "shrdl %1, %%edx\n"
+        "3:\n\t"
+           : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
+           : "0" (multiplicand), "rm" (multiplier), "c" (shift)
+           : "cc");
    return result;
 }
 
index ed82f45b3889b332d30f34842080ceaa6ab8d00a..86032b7f92c3ec36b8c6ca685d44caf72a30f195 100644 (file)
@@ -162,14 +162,14 @@ Mul64x3264(uint64 multiplicand,
    uint64 result, dummy;
    const uint64 multiplier64 = multiplier;
 
-   asm("mulq    %3      \n\t"
-       "shrdq   %1, %0  \n\t"
-       : "=a" (result),
-         "=d" (dummy)
-       : "0"  (multiplier64),
-         "rm" (multiplicand),
+   __asm__("mulq    %3      \n\t"
+           "shrdq   %1, %0  \n\t"
+           : "=a" (result),
+             "=d" (dummy)
+           : "0"  (multiplier64),
+             "rm" (multiplicand),
          "c"  (shift)
-       : "cc");
+           : "cc");
    return result;
 }
 
@@ -221,7 +221,7 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result, dummy;
    const int64 multiplier64 = multiplier;
 
-   asm("imulq   %3      \n\t"
+   __asm__("imulq   %3      \n\t"
        "shrdq   %1, %0  \n\t"
        : "=a" (result),
          "=d" (dummy)
index f82aabb9adaae67fd39ee5a68f6aa60586783b9f..073c19e3dd2ddd2473345fa1259fb107840e9fb0 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index 376130c6d9256a0ded02b60b1e769cbbadbbe11a..813b72762b4ecf6f7d4344b28644fceeb13899ce 100644 (file)
@@ -59,7 +59,7 @@
 /*
  * Brief names are used when the VMware prefix is not wanted.
  */
-#define PRODUCT_SCALABLE_SERVER_BRIEF_NAME "ESX Server"
+#define PRODUCT_SCALABLE_SERVER_BRIEF_NAME "ESX"
 #define PRODUCT_WGS_BRIEF_NAME "Server"
 #define PRODUCT_GSX_BRIEF_NAME "GSX Server"
 #define PRODUCT_WORKSTATION_BRIEF_NAME "Workstation"
 
 // XXX VMvisor is the underlying technology for possibly several products,
 // XXX not the product. Fix when names are decided.
-#define PRODUCT_VMVISOR_NAME MAKE_NAME("VMvisor")
+// #define PRODUCT_VMVISOR_NAME MAKE_NAME("VMvisor")
+// XXX Only one product for now so just hardcode it.
+#define PRODUCT_VMVISOR_NAME MAKE_NAME(PRODUCT_SCALABLE_SERVER_BRIEF_NAME "i")
 
 /*
  * VMware Remote Console (VMRC) version definitions
 #  define PRODUCT_NAME_PLATFORM         PRODUCT_NAME " for FreeBSD"
 #elif defined(sun)
 #  define PRODUCT_NAME_PLATFORM         PRODUCT_NAME " for Solaris"
+#elif defined(__APPLE__)
+#  define PRODUCT_NAME_PLATFORM         PRODUCT_NAME " for Mac OS X"
 #else
 #  ifdef VMX86_TOOLS
 #    error "Define a product string for this platform."
index 91fe2a62f691ab78e3191267a287a5e18fd0ce99..7566778e5abca4dfaab59e83d0a169ae8b09dda1 100644 (file)
@@ -68,6 +68,18 @@ typedef uint32 ToolsVersion;
 
 #endif
 
+/*
+ * Reserve the highest possible Tools version for Tools whose lifecycle isn't
+ * to be managed by VMware's platform.
+ *
+ * Even though the ToolsVersion type is defined as uint32 above, the VMX had,
+ * for a long time, scanned it via sscanf(3) using "%d". To preserve backwards
+ * compatibility with such a VMX, the "highest possible" version is defined to
+ * be the largest signed 32-bit integer instead of the largest unsigned 32-bit
+ * integer.
+ */
+#define TOOLS_VERSION_UNMANAGED 0x7fffffff
+
 #define STRINGER(MJR, MNR, BASE)     #MJR "." #MNR "." #BASE
 #define TOOLS_VERSION_STRINGER(MJR, MNR, BASE)    STRINGER(MJR, MNR, BASE)
 
index 9955d2a79786bd219bfb9dc1d090f0b5be3a5122..831c6b08e412e275041d056a617407044e02e52c 100644 (file)
 #define VMLS_VERSION "e.x.p"
 #define LICENSE_VERSION "e.x.p"
 #define DDK_VERSION "e.x.p"
-#define VIM_API_VERSION "2.5.0"
+#define VIM_API_VERSION "4.0"
 #define VIPERL_VERSION "1.1.0"
-#define RCLI_VERSION "1.5.0"
+#define RCLI_VERSION "4.0.0"
 #define VDM_VERSION "e.x.p"
 #define VDM_CLIENT_VERSION "e.x.p"
 
  *
  * XXX: The extract-macro script should be updated to handle this special case.
  */
-#define TOOLS_VERSION "2008.06.03"
+#define TOOLS_VERSION "2008.06.20"
 
 #ifdef VMX86_VPX
 #define VIM_API_TYPE "VirtualCenter"
diff --git a/open-vm-tools/lib/include/vmxrpc.h b/open-vm-tools/lib/include/vmxrpc.h
new file mode 100644 (file)
index 0000000..bf63c7d
--- /dev/null
@@ -0,0 +1,267 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * vmxrpc.h --
+ *
+ *    VMware extensions to XDR types. Wrappers to allow the use of types declared
+ *    in vm_basic_types.h in structures.
+ */
+
+#ifndef _VMXRPC_H_
+#define _VMXRPC_H_
+
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+#include "vm_basic_types.h"
+
+/*
+ * glibc and Solaris headers seem to define functions for unsigned types with
+ * slightly different names than all other platforms. Provide macros to
+ * translate the names to the more common ones.
+ */
+#if defined(__GLIBC__) || defined(sun)
+#  define xdr_u_int16_t(x, i)    xdr_uint16_t(x, i)
+#  define xdr_u_int32_t(x, i)    xdr_uint32_t(x, i)
+#  define xdr_u_int64_t(x, i)    xdr_uint64_t(x, i)
+#endif
+
+
+/* Wrapper around xdr_free that does casting automatically. */
+#define VMX_XDR_FREE(func, data) xdr_free((xdrproc_t)(func), (char *)(data))
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_int8 --
+ *
+ *    XDR function for encoding/decoding int8.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_int8(XDR *xdrs,  // IN
+         int8 *ip)   // IN/OUT
+{
+   return xdr_char(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_uint8 --
+ *
+ *    XDR function for encoding/decoding uint8.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_uint8(XDR *xdrs, // IN
+          uint8 *ip) // IN/OUT
+{
+   return xdr_u_char(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_int16 --
+ *
+ *    XDR function for encoding/decoding int16.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_int16(XDR *xdrs, // IN
+          int16 *ip) // IN/OUT
+{
+   return xdr_int16_t(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_uint16 --
+ *
+ *    XDR function for encoding/decoding uint16.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_uint16(XDR *xdrs,   // IN
+           uint16 *ip)  // IN/OUT
+{
+   return xdr_u_int16_t(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_int32 --
+ *
+ *    XDR function for encoding/decoding int32.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_int32(XDR *xdrs, // IN
+          int32 *ip) // IN/OUT
+{
+   return xdr_int32_t(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_uint32 --
+ *
+ *    XDR function for encoding/decoding uint32.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_uint32(XDR *xdrs,   // IN
+           uint32 *ip)  // IN/OUT
+{
+   return xdr_u_int32_t(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_int64 --
+ *
+ *    XDR function for encoding/decoding int64.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_int64(XDR *xdrs, // IN
+          int64 *ip) // IN/OUT
+{
+   return xdr_int64_t(xdrs, ip);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_uint64 --
+ *
+ *    XDR function for encoding/decoding uint64.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE bool_t
+xdr_uint64(XDR *xdrs,   // IN
+           uint64 *ip)  // IN/OUT
+{
+   return xdr_u_int64_t(xdrs, ip);
+}
+
+
+/* See vm_basic_types.h. X defines a different Bool. */
+#if !defined(__STRICT_ANSI__) || defined(__FreeBSD__)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * xdr_Bool --
+ *
+ *    XDR function for encoding/decoding Bool.
+ *
+ * Results:
+ *    Whether the call succeeded.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+static INLINE bool_t
+xdr_Bool(XDR *xdrs,  // IN
+         Bool *ip)   // IN/OUT
+{
+   return xdr_char(xdrs, ip);
+}
+#endif
+
+#endif /* _VMXRPC_H_ */
+
index 1a70f8e4968d6d441b241eac9567bdde44b5b76a..1dcd9f81d66c8414461c66bcddf8f3f41858bece 100644 (file)
@@ -47,6 +47,7 @@ typedef enum {
 
 /* Max size of a path */
 #define NATIVE_MAX_PATH 256
+#define MAX_WIPER_FILE_SIZE (2 << 30)   /* The maximum wiper file size in bytes */
 
 typedef struct WiperPartition {
    unsigned char mountPoint[NATIVE_MAX_PATH];
index 8ae14b063c58130cf9f663c3cf3bd60230e9f78a..8d6c1e87451d4c565006a0f80e15d54102609db8 100644 (file)
@@ -54,17 +54,36 @@ typedef union CPUIDRegsUnion {
 } CPUIDRegsUnion;
 
 /*
- * Results of calling cpuid(eaxArg, ecxArg) on all logical processors. 
+ * Results of calling cpuid(eax, ecx) on all host logical CPU.
  */
 #ifdef _MSC_VER
 #pragma warning (disable :4200) // non-std extension: zero-sized array in struct
 #endif
 
-typedef struct CPUIDResult {
-   uint32 numLogicalCPUs;
-   uint32 eaxArg, ecxArg;
-   CPUIDRegs regs[0];
-} CPUIDResult;
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDReply {
+   /*
+    * Unique host logical CPU identifier. It does not change across queries, so
+    * we use it to correlate the replies of multiple queries.
+    */
+   uint64 tag;                // OUT
+
+   CPUIDRegs regs;            // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDReply;
+
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDQuery {
+   uint32 eax;                // IN
+   uint32 ecx;                // IN
+   uint32 numLogicalCPUs;     // IN/OUT
+   CPUIDReply logicalCPUs[0]; // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDQuery;
 
 /*
  * CPUID levels the monitor caches and ones that are not cached, but
@@ -315,10 +334,10 @@ FLAGDEF(   6, ECX, INTEL,   0,  1, HW_COORD_FEEDBACK,   IGNORE,  0, FALSE)
 
 /*    LEVEL, REG, VENDOR, POS, SIZE, NAME,   MASK TYPE, SET TO, CPL3, [FUNC] */
 #define CPUID_FIELD_DATA_LEVEL_A                                               \
-FIELDDEF(  A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE, PMC_VERSION) \
 FIELDDEFA( A, EAX, INTEL,   8,  8, NUM_PMCS,            IGNORE,  0, FALSE, NUM_PMCS)  \
 FIELDDEF(  A, EAX, INTEL,  16,  8, PMC_BIT_WIDTH,       IGNORE,  0, FALSE)            \
-FIELDDEF(  A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE, PMC_EBX_LENGTH) \
 FLAGDEF(   A, EBX, INTEL,   0,  1, PMC_CORE_CYCLE,      IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   1,  1, PMC_INSTR_RETIRED,   IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   2,  1, PMC_REF_CYCLES,      IGNORE,  0, FALSE)            \
@@ -458,7 +477,11 @@ FIELDDEF( 8A, EDX, AMD,     4, 28, SVMEDX_RSVD,         MASK,    0, FALSE)
                       CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FIELDDEFA(lvl, reg, vend, bitpos, size, name, m, v, c3, f)      \
-         FIELDDEF(lvl, reg, vend, bitpos, size, name, m, v, c3)
+   CPUID_##vend##_ID##lvl##reg##_##name##_SHIFT = bitpos,               \
+   CPUID_##vend##_ID##lvl##reg##_##name##_MASK  =                       \
+                      VMW_BIT_MASK(size) << bitpos,                     \
+   CPUID_FEATURE_##vend##_ID##lvl##reg##_##name =                       \
+                      CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FLAGDEFA FIELDDEFA
 #define FLAGDEF FIELDDEF
@@ -796,6 +819,33 @@ CPUID_RequiresFence(CpuidVendors vendor, // IN
 }
 
 
+/*
+ *----------------------------------------------------------------------
+ *
+ * CPUID_CountsCPUIDAsBranch --
+ *
+ *      Returns TRUE iff the cpuid given counts CPUID as a branch
+ *      (i.e. is a pre-Merom E CPU).
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE Bool
+CPUID_CountsCPUIDAsBranch(uint32 v) /* %eax from CPUID with %eax=1 */
+{
+   /* 
+    * CPUID no longer a branch starting with Merom E. Bug 148411.
+    * Penryn (Extended Model: 1) also has this fixed.
+    *
+    * Merom E is: CPUID.1.eax & 0xfff = 0x6f9
+    */
+   return !(CPUID_FAMILY_IS_P6(v) &&
+            (CPUID_EFFECTIVE_MODEL(v) > CPUID_MODEL_CORE2 ||
+             (CPUID_EFFECTIVE_MODEL(v) == CPUID_MODEL_CORE2 &&
+              CPUID_STEPPING(v) >= 9)));
+}
+
+
 /* 
  * The following low-level functions compute the number of
  * cores per cpu.  They should be used cautiously because
@@ -828,4 +878,5 @@ CPUID_IsHypervisorLevel(uint32 level, uint32 *offset)
    return (level & 0xffffff00) == 0x40000000;
 }
 
+
 #endif
diff --git a/open-vm-tools/lib/include/xdrutil.h b/open-vm-tools/lib/include/xdrutil.h
new file mode 100644 (file)
index 0000000..776baa2
--- /dev/null
@@ -0,0 +1,71 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+#ifndef _XDRUTIL_H_
+#define _XDRUTIL_H_
+
+/*
+ * xdrutil.h --
+ *
+ *    Utility functions for code that uses XDR to encode/decode data.
+ */
+
+#include <rpc/rpc.h>
+#include "vm_basic_types.h"
+
+/*
+ * Helper macros for iterating over an rpcgen-generated array. Given a struct S:
+ *
+ * struct S {
+ *    struct {
+ *       u_int f_len;
+ *       T *f_val;
+ *    } f;
+ * };
+ *
+ * Iterate over the array like this:
+ *
+ * S s;
+ * u_int i;
+ *
+ * XDRUTIL_FOREACH(i, &s, f) {
+ *    T *t = XDRUTIL_GETITEM(&s, f, i);
+ * }
+ *
+ * 'f' should be a string with the field name.
+ */
+#define XDRUTIL_FOREACH(counter, ptr, field)                               \
+   for ((counter) = 0; (counter) < (ptr)->field.field##_len; (counter)++)
+
+#define XDRUTIL_GETITEM(ptr, field, idx) &((ptr)->field.field##_val[idx])
+
+/*
+ * Wrapper for XdrUtil_ArrayAppend that automatically populates the arguments
+ * from a given XDR array.
+ */
+#define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                \
+   XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val, \
+                       &(ptr)->field.field##_len,           \
+                       sizeof *(ptr)->field.field##_val,    \
+                       (cnt));
+
+void *
+XdrUtil_ArrayAppend(void **array, u_int *arrayLen, size_t elemSz, u_int elemCnt);
+
+#endif /* _XDRUTIL_H_ */
+
index 043a68bd60c8ba796468da06ffcc2697b1d37002..f69e095dc293097151275aaa078428821e15945b 100644 (file)
@@ -166,6 +166,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index eab47b91693b288c5e9239a7739ba515182c8b93..8082299a92969a4f4a68e9ad2bce1e17ab2e828c 100644 (file)
@@ -154,6 +154,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 3c36fad547e7bddf35e7da2dd3add8d4fcae9b71..60615aa8a7856fe6e55284dffa61b8b4bf7c2c5d 100644 (file)
@@ -179,6 +179,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 3dbf186e7cb21049fb0d35fb0b5c4bfb5c75f6f4..b666500e6ea31a42cfcb43fd8391a8c18e50dc03 100644 (file)
@@ -69,9 +69,6 @@
 #include "vm_product.h"
 #include "unicode/ucnv.h"
 #include "unicode/putil.h"
-#ifdef _WIN32
-#include "win32u.h"
-#endif
 #include "file.h"
 #include "util.h"
 #include "codeset.h"
 static Bool dontUseIcu = TRUE;
 DEBUG_ONLY(static Bool initedIcu = FALSE;)
 
+
 /*
  * Functions
  */
@@ -130,7 +128,7 @@ DEBUG_ONLY(static Bool initedIcu = FALSE;)
  * CodeSetGetModulePath --
  *
  *      Returns the wide-character current module path. We can't use
- *      Win32U_GetModulePath because it invokes codeset.c conversion
+ *      Win32U_GetModuleFileName because it invokes codeset.c conversion
  *      routines.
  *
  * Returns:
@@ -612,17 +610,15 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
 {
    Bool result = FALSE;
    UErrorCode uerr;
-   char *bufInCur;
-   char *bufInEnd;
-   DynBuf dbpiv;
-   UChar *bufPiv;
-   UChar *bufPivCur;
+   const char *bufInCur;
+   const char *bufInEnd;
+   UChar bufPiv[1024];
+   UChar *bufPivSource;
+   UChar *bufPivTarget;
    UChar *bufPivEnd;
    char *bufOut;
    char *bufOutCur;
    char *bufOutEnd;
-   size_t bufPivSize;
-   size_t bufPivOffset;
    size_t bufOutSize;
    size_t bufOutOffset;
    UConverter *cvin = NULL;
@@ -640,16 +636,25 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
    if (dontUseIcu) {
       /*
        * Fall back.
+       *
+       * XXX CodeSetOld_GenericToGenericDb only supports certain
+       * flags, so make it happy.
        */
+#if !defined USE_ICONV
+      flags = 0;
+#elif defined __linux__
+      if (flags != 0) {
+        flags = CSGTG_TRANSLIT | CSGTG_IGNORE;
+      }
+#endif
       return CodeSetOld_GenericToGenericDb(codeIn, bufIn, sizeIn, codeOut,
                                            flags, db);
    }
 
-   DynBuf_Init(&dbpiv);
-
    /*
     * Trivial case.
     */
+
    if ((0 == sizeIn) || (NULL == bufIn)) {
       result = TRUE;
       goto exit;
@@ -658,6 +663,7 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
    /*
     * Open converters.
     */
+
    uerr = U_ZERO_ERROR;
    cvin = ucnv_open(codeIn, &uerr);
    if (!cvin) {
@@ -673,6 +679,7 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
    /*
     * Set callbacks according to flags.
     */
+
    switch (flags) {
    case CSGTG_NORMAL:
       toUCb = UCNV_TO_U_CALLBACK_STOP;
@@ -707,97 +714,36 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
    }
 
    /*
-    * Convert to pivot buffer. As a starting guess, allocate a pivot
-    * buffer the size of the input string times UChar size (with a
-    * fudge constant added in to avoid degen cases).
+    * Convert using ucnv_convertEx().
+    * As a starting guess, make the output buffer the same size as
+    * the input string (with a fudge constant added in to avoid degen
+    * cases).
     */
-   bufInCur = (char *) bufIn;
-   bufInEnd = (char *) bufIn + sizeIn;
-   bufPivSize = (sizeIn + 4) * sizeof(UChar);
-   bufPivOffset = 0;
-
-   while (TRUE) {
-      if (!DynBuf_Enlarge(&dbpiv, bufPivSize * sizeof(UChar))) {
-         goto exit;
-      }
-
-      bufPiv = (UChar *) DynBuf_Get(&dbpiv);
-      bufPivCur = bufPiv + bufPivOffset;
-      bufPivEnd = bufPiv + bufPivSize;
-
-      uerr = U_ZERO_ERROR;
-      ucnv_toUnicode(cvin, &bufPivCur, bufPivEnd, (const char **) &bufInCur,
-                     bufInEnd, NULL, TRUE, &uerr);
-
-      if (U_BUFFER_OVERFLOW_ERROR == uerr) {
-         /*
-          * 'bufInCur' points to the next chunk of input string to
-          * convert, so we leave it alone. 'bufPivCur' points to right
-          * after the last UChar written, so it should be at or almost
-          * at the end of the buffer.
-          *
-          * Our guess at 'bufPivSize' was obviously wrong, just double
-          * the buffer.
-          */
-         bufPivSize *= 2;
-         bufPivOffset = bufPivCur - bufPiv;
-      } else if (U_FAILURE(uerr)) {
-         /*
-          * Failure.
-          */
-         goto exit;
-      } else {
-         /*
-          * Success.
-          */
-         break;
-      }
-   }
 
-   /*
-    * Convert from pivot buffer. Since we're probably most likely
-    * converting to UTF-8, a safe guess for the byte size of the
-    * output buffer would be the same number of code units as in the
-    * pivot buffer (with a fudge constant added to avoid degen cases).
-    */
-   bufPivEnd = bufPivCur;
-   bufPivCur = bufPiv;
-   bufPivSize = bufPivEnd - bufPivCur;
-   bufOutSize = bufPivSize + 4;
+   bufInCur = bufIn;
+   bufInEnd = bufIn + sizeIn;
+   bufOutSize = sizeIn + 4;
    bufOutOffset = 0;
+   bufPivSource = bufPiv;
+   bufPivTarget = bufPiv;
+   bufPivEnd = bufPiv + ARRAYSIZE(bufPiv);
 
-   while (TRUE) {
+   for (;;) {
       if (!DynBuf_Enlarge(db, bufOutSize)) {
          goto exit;
       }
-
-      bufOut = (char *) DynBuf_Get(db);
+      bufOut = DynBuf_Get(db);
       bufOutCur = bufOut + bufOutOffset;
+      bufOutSize = DynBuf_GetAllocatedSize(db);
       bufOutEnd = bufOut + bufOutSize;
 
       uerr = U_ZERO_ERROR;
-      ucnv_fromUnicode(cvout, &bufOutCur, bufOutEnd,
-                       (const UChar **) &bufPivCur, bufPivEnd, NULL, TRUE,
-                       &uerr);
+      ucnv_convertEx(cvout, cvin, &bufOutCur, bufOutEnd,
+                    &bufInCur, bufInEnd,
+                    bufPiv, &bufPivSource, &bufPivTarget, bufPivEnd,
+                    FALSE, TRUE, &uerr);
 
-      if (U_BUFFER_OVERFLOW_ERROR == uerr) {
-         /*
-          * 'bufPivCur' points to the next chunk of pivot string to
-          * convert, so we leave it alone. 'bufOutCur' points to right
-          * after the last unit written, so it should be at or almost
-          * at the end of the buffer.
-          *
-          * Our guess at 'bufOutSize' was obviously wrong, just double
-          * the buffer.
-          */
-         bufOutSize *= 2;
-         bufOutOffset = bufOutCur - bufOut;
-      } else if (U_FAILURE(uerr)) {
-         /*
-          * Failure.
-          */
-         goto exit;
-      } else {
+      if (!U_FAILURE(uerr)) {
          /*
           * "This was a triumph.
           *  I'm making a note here:
@@ -805,20 +751,34 @@ CodeSet_GenericToGenericDb(const char *codeIn,  // IN
           *  It's hard to overstate
           *  my satisfaction."
           */
+
          break;
       }
+
+      if (U_BUFFER_OVERFLOW_ERROR != uerr) {
+        // failure
+         goto exit;
+      }
+
+      /*
+       * Our guess at 'bufOutSize' was obviously wrong, just double it.
+       * We'll be reallocating bufOut, so will need to recompute bufOutCur
+       * based on bufOutOffset.
+       */
+
+      bufOutSize *= 2;
+      bufOutOffset = bufOutCur - bufOut;
    }
 
    /*
     * Set final size and return.
     */
+
    DynBuf_SetSize(db, bufOutCur - bufOut);
 
    result = TRUE;
 
   exit:
-   DynBuf_Destroy(&dbpiv);
-
    if (cvin) {
       ucnv_close(cvin);
    }
@@ -1395,3 +1355,62 @@ CodeSet_IsEncodingSupported(const char *name) // IN
 
    return FALSE;
 }
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CodeSet_Validate --
+ *
+ *    Validate a string in the given encoding.
+ *
+ * Results:
+ *    TRUE if string is valid,
+ *    FALSE otherwise.
+ *
+ * Side effects:
+ *    None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+CodeSet_Validate(const char *buf,   // IN: the string
+                 size_t size,     // IN: length of string
+                 const char *code)  // IN: encoding
+{
+   UConverter *cv;
+   UErrorCode uerr;
+
+   // ucnv_toUChars takes 32-bit int size
+   ASSERT_NOT_IMPLEMENTED(size <= (size_t) MAX_INT32);
+
+   if (size == 0) {
+      return TRUE;
+   }
+
+   /*
+    * Fallback if necessary.
+    */
+
+   if (dontUseIcu) {
+      return CodeSetOld_Validate(buf, size, code);
+   }
+
+   /*
+    * Calling ucnv_toUChars() this way is the idiom to precompute
+    * the length of the output.  (See preflighting in the ICU User Guide.)
+    * So if the error is not U_BUFFER_OVERFLOW_ERROR, then the input
+    * is bad.
+    */
+
+   uerr = U_ZERO_ERROR;
+   cv = ucnv_open(code, &uerr);
+   ASSERT_NOT_IMPLEMENTED(uerr == U_ZERO_ERROR);
+   ucnv_setToUCallBack(cv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &uerr);
+   ASSERT_NOT_IMPLEMENTED(uerr == U_ZERO_ERROR);
+   ucnv_toUChars(cv, NULL, 0, buf, size, &uerr);
+   ucnv_close(cv);
+
+   return uerr == U_BUFFER_OVERFLOW_ERROR;
+}
index 42e3e6eb6b35da9efb113dec7cf91ab54ed7b4aa..13265e20edbd39603fb5035cb16c8ad6615d77b3 100644 (file)
 #include "util.h"
 #include "str.h"
 
-/*
- * These systems use iconv and nl_langinfo.
- * See the definition of CURRENT_IS_UTF8.
- *
- * In addition, Linux has nl_langinfo_l.  To get the nl_langinfo_l
- * related definitions in local.h, we need to define _GNU_SOURCE,
- * which has to be done above because one of the other standard include
- * files sucks it in.
- */
-
-#if !defined(CURRENT_IS_UTF8) && !defined(_WIN32)
+#if defined(USE_ICONV)
+   /*
+    * Use nl_langinfo_l on Linux.  To get the nl_langinfo_l
+    * related definitions in local.h, we need to define _GNU_SOURCE,
+    * which has to be done above because one of the other standard include
+    * files sucks it in.
+    */
    #include <locale.h>
    #if defined(__linux__) && !defined(LC_CTYPE_MASK)  // Prior to glibc 2.3
       #define LC_CTYPE_MASK (1 << LC_CTYPE)
@@ -68,7 +64,6 @@
       #define freelocale __freelocale
       #define nl_langinfo_l __nl_langinfo_l
    #endif
-   #define USE_ICONV
    #include <dlfcn.h>
    #include <iconv.h>
    #include <langinfo.h>
@@ -1053,8 +1048,7 @@ CodeSetOld_GenericToGenericDb(char const *codeIn,  // IN
          if (!CodeSetOld_CurrentToUtf8(bufIn, sizeIn, &bufOut, &sizeOut)) {
             goto exit;
          }
-      } else if ((STRING_ENCODING_UTF16 == encOut) ||
-                 (STRING_ENCODING_UTF16_LE == encOut)) {
+      } else if (STRING_ENCODING_UTF16_LE == encOut) {
          if (!CodeSetOld_CurrentToUtf16le(bufIn, sizeIn, &bufOut, &sizeOut)) {
             goto exit;
          }
@@ -1066,16 +1060,14 @@ CodeSetOld_GenericToGenericDb(char const *codeIn,  // IN
          if (!CodeSetOld_Utf8ToCurrent(bufIn, sizeIn, &bufOut, &sizeOut)) {
             goto exit;
          }
-      } else if ((STRING_ENCODING_UTF16 == encOut) ||
-                 (STRING_ENCODING_UTF16_LE == encOut)) {
+      } else if (STRING_ENCODING_UTF16_LE == encOut) {
          if (!CodeSetOldUtf8ToUtf16le(bufIn, sizeIn, db)) {
             goto exit;
          }
       } else {
          goto exit;
       }
-   } else if ((STRING_ENCODING_UTF16 == encIn) ||
-              (STRING_ENCODING_UTF16_LE == encIn)) {
+   } else if (STRING_ENCODING_UTF16_LE == encIn) {
       if (rawCurEnc == encOut) {
          if (!CodeSetOld_Utf16leToCurrent(bufIn, sizeIn, &bufOut, &sizeOut)) {
             goto exit;
@@ -1087,6 +1079,18 @@ CodeSetOld_GenericToGenericDb(char const *codeIn,  // IN
       } else {
          goto exit;
       }
+   } else if (STRING_ENCODING_UTF16_BE == encIn) {
+      if (rawCurEnc == encOut) {
+         if (!CodeSetOld_Utf16beToCurrent(bufIn, sizeIn, &bufOut, &sizeOut)) {
+            goto exit;
+         }
+      } else if (STRING_ENCODING_UTF8 == encOut) {
+         if (!CodeSetOld_Utf16beToUtf8_Db(bufIn, sizeIn, db)) {
+            goto exit;
+         }
+      } else {
+         goto exit;
+      }
    }
 
    if (bufOut != NULL && !DynBuf_Append(db, bufOut, sizeOut)) {
@@ -1912,6 +1916,43 @@ CodeSetOld_IsEncodingSupported(const char *name) // IN
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CodeSetOld_Validate --
+ *
+ *    Validate a string in the given encoding.
+ *
+ * Results:
+ *    TRUE if string is valid,
+ *    FALSE otherwise.
+ *
+ * Side effects:
+ *    None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+CodeSetOld_Validate(const char *buf,   // IN: the string
+                    size_t size,       // IN: length of string
+                    const char *code)  // IN: encoding
+{
+   DynBuf db;
+   Bool ok;
+
+   if (size == 0) {
+      return TRUE;
+   }
+
+   DynBuf_Init(&db);
+   ok = CodeSetOld_GenericToGenericDb(code, buf, size, "UTF-8",
+                                     CSGTG_NORMAL, &db);
+   DynBuf_Destroy(&db);
+   return ok;
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -1933,3 +1974,81 @@ CodeSetOld_Init(void)
 {
    return TRUE;
 }
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CodeSetOld_Utf16beToUtf8_Db --
+ *
+ *    Append the content of a buffer (that uses the UTF-16BE encoding) to a
+ *    DynBuf (that uses the UTF-8 encoding). 
+ *
+ * Results:
+ *    TRUE on success
+ *    FALSE on failure
+ *
+ * Side effects:
+ *    None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+CodeSetOld_Utf16beToUtf8_Db(char const *bufIn, // IN
+                            size_t sizeIn,     // IN
+                            DynBuf *db)        // IN
+{
+   int i;
+   char *temp;
+   Bool ret = FALSE;
+   if ((temp = malloc(sizeIn)) == NULL) {
+      return ret;
+   }
+   ASSERT((sizeIn & 1) == 0);
+   ASSERT((ssize_t) sizeIn >= 0);
+
+   for (i = 0; i < sizeIn; i += 2) {
+      temp[i] = bufIn[i + 1];
+      temp[i + 1] = bufIn[i];
+   }
+
+   ret = CodeSetOld_Utf16leToUtf8_Db(temp, sizeIn, db);
+   free(temp);
+   return ret;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CodeSetOld_Utf16beToUtf8 --
+ *
+ *    Convert the content of a buffer (that uses the UTF-16BE encoding) into
+ *    another buffer (that uses the UTF-8 encoding). 
+ *
+ * Results:
+ *    TRUE on success: '*bufOut' contains the allocated, NUL terminated buffer.
+ *                     If not NULL, '*sizeOut' contains the size of the buffer
+ *                     (excluding the NUL terminator)
+ *    FALSE on failure
+ *
+ * Side effects:
+ *    None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+CodeSetOld_Utf16beToUtf8(char const *bufIn, // IN
+                         size_t sizeIn,     // IN
+                         char **bufOut,     // OUT
+                         size_t *sizeOut)   // OUT
+{
+   DynBuf db;
+   Bool ok;
+
+   DynBuf_Init(&db);
+   ok = CodeSetOld_Utf16beToUtf8_Db(bufIn, sizeIn, &db);
+   return CodeSetOldDynBufFinalize(ok, &db, bufOut, sizeOut);
+}
index 56f1553ccced35585a04b3b60409b63196659e1c..ae22d584b0196df7d7b59d74a99268a78a7f0948 100644 (file)
 #ifndef __CODESET_OLD_H__
 #   define __CODESET_OLD_H__
 
-#include "vm_basic_types.h"
-#include "vm_assert.h"
 #include "dynbuf.h"
+#include "codeset.h"  // for CURRENT_IS_UTF8
+
+
+/*
+ * These systems use iconv and nl_langinfo.
+ * See the definition of CURRENT_IS_UTF8.
+ */
+
+#if !defined(CURRENT_IS_UTF8) && !defined(_WIN32)
+   #define USE_ICONV
+#endif
+
 
 /*
  * NO_CORE_ICU is currently only used by oddball Tools builds
@@ -60,6 +70,7 @@
 #define CodeSetOld_Utf8FormCToUtf8FormD CodeSet_Utf8FormCToUtf8FormD
 #define CodeSetOld_GetCurrentCodeSet CodeSet_GetCurrentCodeSet
 #define CodeSetOld_IsEncodingSupported CodeSet_IsEncodingSupported
+#define CodeSetOld_Validate CodeSet_Validate
 #define CodeSetOld_Init CodeSet_Init
 #endif
 
@@ -157,7 +168,23 @@ CodeSetOld_GetCurrentCodeSet(void);
 Bool
 CodeSetOld_IsEncodingSupported(const char *name); // IN
 
+Bool
+CodeSetOld_Validate(const char *buf,   // IN: the string
+                    size_t size,       // IN: length of string
+                    const char *code); // IN: encoding
+
 Bool
 CodeSetOld_Init(void);
 
+Bool
+CodeSetOld_Utf16beToUtf8(char const *bufIn, // IN
+                         size_t sizeIn,     // IN
+                         char **bufOut,     // OUT
+                         size_t *sizeOut);  // OUT
+
+Bool
+CodeSetOld_Utf16beToUtf8_Db(char const *bufIn, // IN
+                            size_t sizeIn,     // IN
+                            DynBuf *db);       // IN
+
 #endif /* __CODESET_OLD_H__ */
index 1f1fa541c0aab2a092131842e4d4bd2c28125d89..533eefb7870536b2cdbf588364ed0b9e7b7a30d3 100644 (file)
@@ -183,7 +183,7 @@ ffs(uint32 bits)
    } else {
       i = 1;
 
-      while (bits) {
+      while ((bits & 0x1) == 0) {
          i++;
          bits >>= 1;
       }
index 351d7e6d5b5bb91454bc7ca530733a3d3f1e0f98..9e7d19ec452d9669f6a4c91d555c35ea69115eed 100644 (file)
@@ -111,7 +111,7 @@ Hostinfo_HostName(void)
    if (!GetHostByNameFn) {
       Warning("%s Failed to find gethostbyname.\n", __FUNCTION__);
       FreeLibrary(dllHandle);
-      return Unicode_Alloc(hostName, STRING_ENCODING_US_ASCII);
+      return Unicode_Alloc(hostName, STRING_ENCODING_DEFAULT);
    }
 
    myHostEnt = (*GetHostByNameFn)(hostName);
@@ -124,7 +124,7 @@ Hostinfo_HostName(void)
       Str_Strcpy(hostName, myHostEnt->h_name, sizeof hostName);
    }
 
-   return Unicode_Alloc(hostName, STRING_ENCODING_US_ASCII);
+   return Unicode_Alloc(hostName, STRING_ENCODING_DEFAULT);
 }
 #elif defined(__APPLE__)       // MacOS X
 #define SYS_NMLN _SYS_NAMELEN
index 34d427f46ee4ba682600bcbb94cf9bd01dd18dde..1daf9f2afcb18e87cc8c250a8e58dcda19ba84e7 100644 (file)
  *
  *********************************************************/
 
+#if !defined(_POSIX_PTHREAD_SEMANTICS) && defined(sun)
+#define _POSIX_PTHREAD_SEMANTICS 1 // Needed to get POSIX-correct getpw*_r() on Solaris
+#endif
+
 #define UNICODE_BUILDING_POSIX_WRAPPERS
 #include <stdio.h>
 #include <stdlib.h>
 #include <utime.h>
 #include <sys/time.h>
 #include <stdarg.h>
+#if !defined(N_PLAT_NLM)
+#include <pwd.h>
+#include <grp.h>
+#endif
 
 #if defined(__APPLE__)
 #include <sys/socket.h>
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <CoreFoundation/CoreFoundation.h>
-#include <pwd.h>
-#include <grp.h>
-#else
-#if !defined(N_PLAT_NLM)
-#include <pwd.h>
-#endif
-#if defined(__FreeBSD__)
+#elif defined(__FreeBSD__)
 #include <sys/param.h>
 #include <sys/mount.h>
-#else
-#if !defined(N_PLAT_NLM)
+#elif !defined(N_PLAT_NLM)
 #include <sys/statfs.h>
 #include <sys/mount.h>
 #if !defined(sun)
 #include <mntent.h>
-#include <grp.h>
 #else
+#include <alloca.h>
 #include <sys/mnttab.h>
 #endif
 #endif
-#endif
+
+#if !defined(__FreeBSD__) || __FreeBSD_release >= 503001
+#define VM_SYSTEM_HAS_GETPWNAM_R 1
+#define VM_SYSTEM_HAS_GETPWUID_R 1
+#define VM_SYSTEM_HAS_GETGRNAM_R 1
 #endif
 
 # if defined(__FreeBSD__) && BSD_VERSION >= 53
 
 #include "vmware.h"
 #include "posixInt.h"
-
+#if defined(sun)
+#include "hashTable.h" // For setenv emulation
+#endif
 
 #if !defined(N_PLAT_NLM)
 static struct passwd *GetpwInternal(struct passwd *pw);
-#if !defined(sun) && !defined(__FreeBSD__)
 static int GetpwInternal_r(struct passwd *pw, char *buf, size_t size,
                            struct passwd **ppw);
 #endif
-#endif
 
 
 /*
@@ -918,7 +923,7 @@ Posix_Execl(ConstUnicode pathName,   // IN:
       va_start(vl, arg0);
       while (va_arg(vl, char *)) {
          count ++;
-      }   
+      }
       va_end(vl);
    }
 
@@ -953,6 +958,7 @@ exit:
    return ret;
 }
 
+
 /*
  *----------------------------------------------------------------------
  *
@@ -989,7 +995,7 @@ Posix_Execlp(ConstUnicode fileName,   // IN:
       va_start(vl, arg0);
       while (va_arg(vl, char *)) {
          count ++;
-      }   
+      }
       va_end(vl);
    }
 
@@ -1529,7 +1535,7 @@ struct passwd *
 Posix_Getpwuid(uid_t uid)  // IN:
 {
    struct passwd *pw;
-   
+
    pw = getpwuid(uid);
    return GetpwInternal(pw);
 }
@@ -1629,6 +1635,7 @@ exit:
 
 
 #if !defined(sun) // {
+
 /*
  *----------------------------------------------------------------------
  *
@@ -1662,6 +1669,7 @@ Posix_Statfs(ConstUnicode pathName,     // IN:
    free(path);
    return ret;
 }
+#endif // } !defined(sun)
 
 
 /*
@@ -1697,7 +1705,46 @@ Posix_Setenv(ConstUnicode name,   // IN:
       goto exit;
    }
 
+#if defined(sun)
+   if (overWrite || !getenv(rawName)) {
+      static HashTable *trackEnv = NULL; // Tracks values to avoid leaks.
+      char *keyStr;
+      char *fullStr;
+      int fslen;
+      int rawNameLen;
+      int rawValueLen;
+
+      if (!trackEnv) {
+         trackEnv = HashTable_Alloc(16, HASH_STRING_KEY, free);
+      }
+      /*
+       * In order to keep memory management and hash table manipulation simple, each env
+       * var is stored as a memory block containing the NUL-terminated environment
+       * variable name, followed immediately in memory by the full argument to putenv
+       * ('varname=value').
+       */
+
+      rawNameLen = strlen(rawName) + 1;
+      rawValueLen = strlen(rawValue) + 1;
+      fslen = rawNameLen + rawValueLen + 1; // 1 is for '=' sign
+      keyStr = malloc(rawNameLen + fslen);
+      fullStr = keyStr + rawNameLen;
+      /*
+       * Use memcpy because Str_Snprintf() doesn't play well with non-UTF8 strings.
+       */
+      memcpy(keyStr, rawName, rawNameLen);
+      memcpy(fullStr, rawName, rawNameLen);
+      fullStr[rawNameLen - 1] = '=';
+      memcpy(fullStr + rawNameLen, rawValue, rawValueLen);
+
+      ret = putenv(fullStr);
+      HashTable_Insert(trackEnv, keyStr, keyStr); // Any old value will be freed
+   } else {
+      ret = 0;
+   }
+#else
    ret = setenv(rawName, rawValue, overWrite);
+#endif
 
 exit:
    free(rawName);
@@ -1731,12 +1778,15 @@ Posix_Unsetenv(ConstUnicode name)   // IN:
       return;
    }
 
+#if defined(sun)
+   putenv(rawName);
+#else
    unsetenv(rawName);
+#endif
    free(rawName);
 }
 
 
-#if !defined(__FreeBSD__) // {
 /*----------------------------------------------------------------------
  * Posix_Getpwent --
  *
@@ -1755,10 +1805,364 @@ struct passwd *
 Posix_Getpwent(void)
 {
    struct passwd *pw;
-   
+
    pw = getpwent();
-   return GetpwInternal(pw);  
+   return GetpwInternal(pw);
+}
+
+#if !defined(VM_SYSTEM_HAS_GETPWNAM_R) || \
+   !defined(VM_SYSTEM_HAS_GETPWUID_R) || \
+   !defined(VM_SYSTEM_HAS_GETGRNAM_R)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyFieldIntoBuf --
+ *
+ *      Copies a field in a passwd/group structure into the supplied buffer, and sets
+ *      that pointer into dest. Used as a helper function for the EmulateGet* routines.
+ *
+ * Results:
+ *      TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *      Updates *buf and *bufLen to allocate space for the copied field.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+CopyFieldIntoBuf(const char *src,
+                 char **dest,
+                 char **buf,
+                 size_t *bufLen)
+{
+   if (src) {
+      size_t needLen = strlen(src) + 1;
+
+      if (*bufLen < needLen) {
+         return FALSE;
+      }
+
+      *dest = *buf;
+      memcpy(*dest, src, needLen);
+      *buf += needLen;
+      *bufLen -= needLen;
+   } else {
+      *dest = NULL;
+   }
+
+   return TRUE;
+}
+
+
+#endif
+
+
+#if !defined(VM_SYSTEM_HAS_GETPWNAM_R) || !defined(VM_SYSTEM_HAS_GETPWUID_R)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * PasswdCopy --
+ *
+ *      Copies a password structure as part of emulating the getpw*_r routines.
+ *
+ * Results:
+ *      'new' if successful, NULL otherwise.
+ *
+ * Side effects:
+ *      Modifies 'buf'
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static struct passwd *
+PasswdCopy(struct passwd *orig, // IN
+           struct passwd *new,  // IN/OUT
+           char *buf,           // IN
+           size_t bufLen)       // IN
+{
+   if (!orig) {
+      return NULL;
+   }
+
+   *new = *orig;
+
+   if (!CopyFieldIntoBuf(orig->pw_name, &new->pw_name, &buf, &bufLen)) {
+      return NULL;
+   }
+   if (!CopyFieldIntoBuf(orig->pw_passwd, &new->pw_passwd, &buf, &bufLen)) {
+      return NULL;
+   }
+   if (!CopyFieldIntoBuf(orig->pw_gecos, &new->pw_gecos, &buf, &bufLen)) {
+      return NULL;
+   }
+   if (!CopyFieldIntoBuf(orig->pw_dir, &new->pw_dir, &buf, &bufLen)) {
+      return NULL;
+   }
+   if (!CopyFieldIntoBuf(orig->pw_shell, &new->pw_shell, &buf, &bufLen)) {
+      return NULL;
+   }
+#ifdef __FreeBSD__
+   if (!CopyFieldIntoBuf(orig->pw_class, &new->pw_class, &buf, &bufLen)) {
+      return NULL;
+   }
+#endif
+
+   return new;
+}
+#endif
+
+
+#ifndef VM_SYSTEM_HAS_GETPWNAM_R
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * EmulateGetpwnam_r --
+ *
+ *      Emulates getpwnam_r() for old/odd systems that don't have it
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Data may be stored in 'buf'.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static int
+EmulateGetpwnam_r(const char *name,       // IN
+                  struct passwd *pwbuf,   // IN/OUT
+                  char *buf,              // IN
+                  size_t buflen,          // IN
+                  struct passwd **pwbufp) // IN/OUT
+{
+   static Atomic_uint32 mutex = {0};
+   struct passwd *pw;
+   int savedErrno;
+
+   ASSERT(pwbuf);
+   ASSERT(name);
+   ASSERT(buf);
+   ASSERT(pwbufp);
+
+   /*
+    * XXX Use YIELD() here when it works on FreeBSD.
+    */
+   while (Atomic_ReadWrite(&mutex, 1)); // Spinlock.
+
+   pw = getpwnam(name);
+   savedErrno = errno;
+   *pwbufp = PasswdCopy(pw, pwbuf, buf, buflen);
+
+   Atomic_Write(&mutex, 0);
+
+   if (pw) {
+      return 0;
+   } else if (savedErrno) {
+      return savedErrno;
+   } else {
+      return ENOENT;
+   }
 }
+#endif
+
+
+#ifndef VM_SYSTEM_HAS_GETPWUID_R
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * EmulateGetpwuid_r --
+ *
+ *      Emulates getpwuid_r() for old/odd systems that don't have it
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static int
+EmulateGetpwuid_r(uid_t uid,              // IN
+                  struct passwd *pwbuf,   // IN/OUT
+                  char *buf,              // IN
+                  size_t buflen,          // IN
+                  struct passwd **pwbufp) // IN/OUT
+{
+   static Atomic_uint32 mutex = {0};
+   struct passwd *pw;
+   int savedErrno;
+
+   ASSERT(pwbuf);
+   ASSERT(buf);
+   ASSERT(pwbufp);
+
+   /*
+    * XXX Use YIELD() here when it works on FreeBSD.
+    */
+   while (Atomic_ReadWrite(&mutex, 1)); // Spinlock
+
+   pw = getpwuid(uid);
+   savedErrno = errno;
+   *pwbufp = PasswdCopy(pw, pwbuf, buf, buflen);
+
+   Atomic_Write(&mutex, 0);
+
+   if (pw) {
+      return 0;
+   } else if (savedErrno) {
+      return savedErrno;
+   } else {
+      return ENOENT;
+   }
+}
+#endif
+
+
+#ifndef VM_SYSTEM_HAS_GETGRNAM_R
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * GroupCopy --
+ *
+ *      Copies a password structure as part of emulating the getgr*_r routines.
+ *
+ * Results:
+ *      'new' if successful, NULL otherwise.
+ *
+ * Side effects:
+ *      Modifies 'buf'
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static struct group *
+GroupCopy(struct group *orig, // IN
+          struct group *new,  // IN/OUT
+          char *buf,          // IN
+          size_t bufLen)      // IN
+{
+   if (!orig) {
+      return NULL;
+   }
+
+   *new = *orig;
+
+   if (!CopyFieldIntoBuf(orig->gr_name, &new->gr_name, &buf, &bufLen)) {
+      return NULL;
+   }
+   if (!CopyFieldIntoBuf(orig->gr_passwd, &new->gr_passwd, &buf, &bufLen)) {
+      return NULL;
+   }
+
+   if (orig->gr_mem) {
+      int i;
+      uintptr_t alignLen;
+      char **newGrMem;
+
+      /*
+       * Before putting the gr_mem 'char **' array into 'buf', aligns the buffer to a
+       * pointer-size boundary.
+       */
+      alignLen = ((((uintptr_t) buf) + (sizeof(void *) - 1)) & ~(sizeof(void *) - 1));
+      alignLen -= ((uintptr_t) buf);
+
+      if (bufLen < alignLen) {
+         return NULL;
+      }
+      buf += alignLen;
+      bufLen -= alignLen;
+
+      /*
+       * Count the number of items in the gr_mem array, and then copy them all.
+       */
+      for (i = 0; orig->gr_mem[i]; i++);
+      i++; // need space for a terminating NULL
+
+      if (bufLen < (i * sizeof(void *))) {
+         return NULL;
+      }
+      newGrMem = (char **)buf;
+      buf += i * sizeof(void *);
+      bufLen -= i * sizeof(void *);
+
+      for (i = 0; orig->gr_mem[i]; i++, newGrMem++) {
+         size_t flen;
+
+         flen = strlen(orig->gr_mem[i]) + 1;
+         if (bufLen < flen) {
+            return NULL;
+         }
+
+         *newGrMem = buf;
+         memcpy(*newGrMem, orig->gr_mem[i], flen);
+         buf += flen;
+         bufLen -= flen;
+      }
+      *newGrMem = NULL;
+   }
+
+   return new;
+}
+#endif
+
+
+#ifndef VM_SYSTEM_HAS_GETGRNAM_R
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * EmulateGetgrnam_r --
+ *
+ *      Emulates getgrnam_r() for old/odd systems that don't have it
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Data may be stored in 'buf'.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static int
+EmulateGetgrnam_r(const char *name,       // IN
+                  struct group *grbuf,    // IN/OUT
+                  char *buf,              // IN
+                  size_t buflen,          // IN
+                  struct group **grbufp)  // IN/OUT
+{
+   static Atomic_uint32 mutex = {0};
+   struct group *gr;
+   int savedErrno;
+
+   ASSERT(grbuf);
+   ASSERT(name);
+   ASSERT(buf);
+   ASSERT(grbufp);
+
+   /*
+    * XXX Use YIELD() here once it is available on FreeBSD
+    */
+   while (Atomic_ReadWrite(&mutex, 1)); // Spinlock
+
+   gr = getgrnam(name);
+   savedErrno = errno;
+   *grbufp = GroupCopy(gr, grbuf, buf, buflen);
+
+   Atomic_Write(&mutex, 0);
+
+   if (gr) {
+      return 0;
+   } else if (savedErrno) {
+      return savedErrno;
+   } else {
+      return ENOENT;
+   }
+}
+#endif
 
 
 /*
@@ -1799,7 +2203,12 @@ Posix_Getpwnam_r(ConstUnicode name,    // IN:
       return errno;
    }
 
+#if defined(VM_SYSTEM_HAS_GETPWNAM_R)
    ret = getpwnam_r(tmpname, pw, buf, size, ppw);
+#else
+   ret = EmulateGetpwnam_r(tmpname, pw, buf, size, ppw);
+#endif
+
    free(tmpname);
 
    // ret is errno on failure, *ppw is NULL if no matching entry found.
@@ -1837,9 +2246,13 @@ Posix_Getpwuid_r(uid_t uid,            // IN:
 {
    int ret;
 
+#if defined(VM_SYSTEM_HAS_GETPWNAM_R)
    ret = getpwuid_r(uid, pw, buf, size, ppw);
-   // ret is errno on failure, *ppw is NULL if no matching entry found.
+#else
+   ret = EmulateGetpwuid_r(uid, pw, buf, size, ppw);
+#endif
    if (ret != 0 || *ppw == NULL) {
+   // ret is errno on failure, *ppw is NULL if no matching entry found.
       return ret;
    }
 
@@ -1974,6 +2387,7 @@ exit:
 }
 
 
+#if !defined(sun)
 /*
  *----------------------------------------------------------------------
  *
@@ -1982,10 +2396,10 @@ exit:
  *      POSIX getgrouplist()
  *
  * Results:
- *      Returns number of groups found, or -1 if *ngroups is 
+ *      Returns number of groups found, or -1 if *ngroups is
  *      smaller than number of groups found.  Also returns
  *      the list of groups.
- *     
+ *
  * Side effects:
  *      None.
  *
@@ -2031,6 +2445,9 @@ Posix_GetGroupList(ConstUnicode user,    // IN:
    return ret;
 }
 
+
+#endif
+
 /*
  *----------------------------------------------------------------------
  * Posix_Getgrnam --
@@ -2053,13 +2470,13 @@ Posix_Getgrnam(ConstUnicode name)  // IN:
    char *tmpname;
    int ret;
    static struct group sgr = {0};
-   
+
    if (!PosixConvertToCurrent(name, &tmpname)) {
       return NULL;
    }
    gr = getgrnam(tmpname);
    free(tmpname);
-   
+
    if (!gr) {
       return NULL;
    }
@@ -2089,9 +2506,9 @@ Posix_Getgrnam(ConstUnicode name)  // IN:
    if (gr->gr_mem) {
       sgr.gr_mem = Unicode_AllocList(gr->gr_mem, -1, STRING_ENCODING_DEFAULT);
    }
-   
+
    ret = 0;
-   
+
  exit:
    if (ret != 0) {
       errno = ret;
@@ -2144,7 +2561,11 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
       return errno;
    }
 
+#if defined(VM_SYSTEM_HAS_GETGRNAM_R)
    ret = getgrnam_r(tmpname, gr, buf, size, pgr);
+#else
+   ret = EmulateGetgrnam_r(tmpname, gr, buf, size, pgr);
+#endif
    free(tmpname);
 
    // ret is errno on failure, *pgr is NULL if no matching entry found.
@@ -2175,7 +2596,7 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
    if (gr->gr_mem) {
       grmem = Unicode_AllocList(gr->gr_mem, -1, STRING_ENCODING_DEFAULT);
    }
-   
+
    /*
     * Put UTF-8 strings into the structure.
     */
@@ -2185,7 +2606,7 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
 
    if (grname) {
       size_t len = strlen(grname) + 1;
-      if (n + len > size || n + len < n  ) {
+      if (n + len > size) {
          goto exit;
       }
       gr->gr_name = memcpy(buf + n, grname, len);
@@ -2194,7 +2615,7 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
 
    if (grpasswd != NULL) {
       size_t len = strlen(grpasswd) + 1;
-      if (n + len > size || n + len < n) {
+      if (n + len > size) {
          goto exit;
       }
       gr->gr_passwd = memcpy(buf + n, grpasswd, len);
@@ -2204,14 +2625,14 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
    if (grmem) {
       for (i = 0; grmem[i]; i++) {
          size_t len = strlen(grmem[i]) + 1;
-         if (n + len > size || n + len < n) {
+         if (n + len > size) {
            goto exit;
          }
          gr->gr_mem[i] = memcpy(buf + n, grmem[i], len);
          n += len;
       }
    }
-   
+
    ret = 0;
 
  exit:
@@ -2224,7 +2645,9 @@ Posix_Getgrnam_r(ConstUnicode name,    // IN:
 }
 
 
-#if !defined(__APPLE__) // {
+#if !defined(sun) // {
+
+#if !defined(__APPLE__) && !defined(__FreeBSD__) // {
 /*
  *----------------------------------------------------------------------
  *
@@ -2523,8 +2946,8 @@ exit:
    return m;
 }
 
-#endif // } !defined(__APPLE__)
-#endif // } !defined(__FreeBSD__)
+
+#endif // } !defined(__APPLE__) && !defined(__FreeBSD)
 
 
 #else  // } !defined(sun) {
index 710b25e32e170bae9b83922cd4015204ef61a8bf..0e87d3aa7a1004c250766e97f5503c4b98377f2b 100644 (file)
@@ -163,6 +163,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 870e21c327d0612bf49b7ddba5a763950ffd4549..33d8b41dc1f54e4b31ab8301bcc25860cd6c65d2 100644 (file)
@@ -864,20 +864,20 @@ static int Win32TimeUtilLookupZoneIndex(const char* targetName)
 {
    int timeZoneIndex = (-1);
    HKEY parentKey, childKey;
-   TCHAR childKeyName[255];
+   char childKeyName[255];
    int keyIndex, childKeyLen=255;
    DWORD rv;
 
    /* Open parent key containing timezone child keys */
-   if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
-                    (LPCTSTR) "SOFTWARE\\"
-                    "Microsoft\\"
-                    "Windows NT\\"
-                    "CurrentVersion\\"
-                    "Time Zones",
-                    0,
-                    KEY_READ,
-                    &parentKey) != ERROR_SUCCESS) {
+   if (Win32U_RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                           "SOFTWARE\\"
+                           "Microsoft\\"
+                           "Windows NT\\"
+                           "CurrentVersion\\"
+                           "Time Zones",
+                           0,
+                           KEY_READ,
+                           &parentKey) != ERROR_SUCCESS) {
       /* Failed to open registry */
       return (-1);
    }
@@ -886,32 +886,32 @@ static int Win32TimeUtilLookupZoneIndex(const char* targetName)
    keyIndex = 0;
    while (
          timeZoneIndex < 0 &&
-         RegEnumKeyEx(parentKey,
-                      keyIndex,
-                      childKeyName,
-                      &childKeyLen,
-                      0,0,0,0) == ERROR_SUCCESS) {
+         Win32U_RegEnumKeyEx(parentKey,
+                             keyIndex,
+                             childKeyName,
+                             &childKeyLen,
+                             0,0,0,0) == ERROR_SUCCESS) {
 
       char* std;
       DWORD stdSize;
 
       /* Open child key */
-      rv = RegOpenKeyEx(parentKey, childKeyName, 0, KEY_READ, &childKey);
+      rv = Win32U_RegOpenKeyEx(parentKey, childKeyName, 0, KEY_READ, &childKey);
       if (rv != ERROR_SUCCESS) {
          continue;
       }
 
       /* Get size of "Std" value */
-      if (RegQueryValueEx(childKey,
-                          (LPCTSTR) "Std", 0, 0,
-                          NULL, &stdSize) == ERROR_SUCCESS) {
+      if (Win32U_RegQueryValueEx(childKey,
+                                 "Std", 0, 0,
+                                 NULL, &stdSize) == ERROR_SUCCESS) {
 
          /* Get value of "Std" */
          std = (char*) calloc(stdSize+1, sizeof(char));
          if (std != NULL) {
-            if (RegQueryValueEx(childKey,
-                                (LPCTSTR) "Std", 0, 0,
-                                (LPBYTE) std, &stdSize) == ERROR_SUCCESS) {
+            if (Win32U_RegQueryValueEx(childKey,
+                                       "Std", 0, 0,
+                                       (LPBYTE) std, &stdSize) == ERROR_SUCCESS) {
 
                /* Make sure there is at least one EOS */
                std[stdSize] = '\0';
@@ -922,10 +922,10 @@ static int Win32TimeUtilLookupZoneIndex(const char* targetName)
                   /* yes: look up value of "Index" */
                   DWORD val = 0;
                   DWORD valSize = sizeof(val);
-                  if (RegQueryValueEx(childKey,
-                                      (LPCTSTR) "Index", 0, 0,
-                                      (LPBYTE) &val,
-                                      &valSize) == ERROR_SUCCESS) {
+                  if (Win32U_RegQueryValueEx(childKey,
+                                             "Index", 0, 0,
+                                             (LPBYTE) &val,
+                                             &valSize) == ERROR_SUCCESS) {
                      timeZoneIndex = val;
                   }
               }
index 2de71ddfa4411e77ba71ab71fd165808cf739b0a..a1f1d7526d8271e4b8b2bf03e4a45f0faa970d1c 100644 (file)
@@ -19,3 +19,5 @@ noinst_LIBRARIES = libNetUtil.a
 
 libNetUtil_a_SOURCES =
 libNetUtil_a_SOURCES += netUtilLinux.c
+AM_CFLAGS = -I$(top_builddir)/include
+
index a95a0d5619ec74aac1ca4ebaa813bb8792a74e84..bd71a0a1a835a368aacab8cf0c78cd4b92deab44 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -221,6 +222,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libNetUtil.a
 libNetUtil_a_SOURCES = netUtilLinux.c
+AM_CFLAGS = -I$(top_builddir)/include
 all: all-am
 
 .SUFFIXES:
index d48f85fc0aeb4fab08ed86e1e60dbf686a69e4e4..53a53ca686317fcb38b36e7ea750205838eab451 100644 (file)
@@ -243,7 +243,7 @@ NetUtil_GetPrimaryIP(void)
 /*
  *----------------------------------------------------------------------
  *
- * NetUtil_GetPrimaryNicEntry --
+ * NetUtil_GetPrimaryNic --
  *
  *      Get the primary Nic entry for this machine. Primary Nic is the 
  *      first interface that comes up when you do a ifconfig.
@@ -259,11 +259,11 @@ NetUtil_GetPrimaryIP(void)
  *----------------------------------------------------------------------
  */
 
-NicEntry *
-NetUtil_GetPrimaryNicEntry(void)
+GuestNic *
+NetUtil_GetPrimaryNic(void)
 {
-   NicEntry *nicEntry = NULL;
-   VmIpAddressEntry *ipAddressEntry;
+   GuestNic *nicEntry = NULL;
+   VmIpAddress *ip;
    char *ipstr;
 
    ipstr = NetUtil_GetPrimaryIP();
@@ -272,18 +272,12 @@ NetUtil_GetPrimaryNicEntry(void)
    }
 
    nicEntry = Util_SafeCalloc(1, sizeof *nicEntry);
-   DblLnkLst_Init(&nicEntry->ipAddressList);
-   ipAddressEntry = Util_SafeCalloc(1, sizeof *ipAddressEntry);
-   DblLnkLst_Init(&ipAddressEntry->links);
-   DblLnkLst_LinkLast(&nicEntry->ipAddressList, &ipAddressEntry->links);
+   ip = Util_SafeCalloc(1, sizeof *ip);
 
-   /*
-    *  Now, record these values in nicEntry.
-    */
-   Str_Strcpy(ipAddressEntry->ipEntryProto.ipAddress, 
-              ipstr,
-              sizeof ipAddressEntry->ipEntryProto.ipAddress);
+   nicEntry->ips.ips_len = 1;
+   nicEntry->ips.ips_val = ip;
 
+   Str_Strcpy(ip->ipAddress, ipstr, sizeof ip->ipAddress);
    free(ipstr);
 
 abort:
index 4129fbc52d2228c4a4486ebc6d19a634beb3444e..b957f6dd7637c47439832bfd12600bb8778526cf 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 8713848f1667d9cadab35ef1ad9b9a3c301e168d..a612887d088701f5f69826095b228f5f1f925178 100644 (file)
 #include "str.h"
 #include "config.h"
 #include "util.h"
-#ifdef _WIN32
+#if defined(_WIN32) || !defined(VMX86_TOOLS)
 #include "coreDump.h"
+#endif
+#ifdef _WIN32
 #include "win32u.h"
 #endif
 
-
 typedef enum {
    PanicBreakLevel_Never,
    PanicBreakLevel_IfDebuggerAttached,
@@ -491,13 +492,9 @@ Panic_Panic(const char *format,
     * to double panic.
     */
 
-#ifdef _WIN32
    Panic_DumpGuiResources();
 
-   /*
-    * XXX: Posix app coredumps have to wait until the coredump code makes
-    * it out of lib/left/sigPosix and into lib/user/panic.
-    */
+#if defined(_WIN32) ||  !defined(VMX86_TOOLS)
    if (Panic_GetCoreDumpOnPanic()) {
       CoreDump_CoreDump();
    }
@@ -521,17 +518,12 @@ Panic_Panic(const char *format,
 }
 
 
-#ifdef _WIN32
 /*
  *-----------------------------------------------------------------------------
  *
  * Panic_DumpGuiResources --
  *
- *      Dumps Win32 userlevel resources used by the current process.
- *      Dynamically loads user32!GetGuiResources because it's only
- *      implemented on Windows 2000 and later, while this module is
- *      linked by tools and possibly other things that need legacy
- *      Windows support.
+ *      Dumps userlevel resources used by the current process.
  *
  * Results:
  *      void
@@ -545,6 +537,7 @@ Panic_Panic(const char *format,
 void
 Panic_DumpGuiResources(void)
 {
+#ifdef _WIN32
    HANDLE hUser = Win32U_GetModuleHandle("user32.dll");
    if (hUser) {
       typedef DWORD (WINAPI *fnGetGuiResources)(HANDLE, DWORD);
@@ -556,5 +549,5 @@ Panic_DumpGuiResources(void)
                  pGetGuiResources(GetCurrentProcess(), GR_USEROBJECTS));
       }
    }
-}
 #endif
+}
index b779162eb500596d29866f2b3d0fc2bc62374e78..eafe97877cc24043f74108d4bb9d69aeb9d3741f 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 4f6ff0018bf2b319ebfe5e31074c19bd1cbf87c9..54cbf0a957d84f5bb744a58f79122557971e1b7b 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 2eb810ba82748c6d43afccb66775075fe78623a8..2ff05bfc5e96e2b6909715bd271f4e1af1e96f10 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
diff --git a/open-vm-tools/lib/resolution/Makefile.am b/open-vm-tools/lib/resolution/Makefile.am
new file mode 100644 (file)
index 0000000..1d65a59
--- /dev/null
@@ -0,0 +1,27 @@
+################################################################################
+### Copyright 2007 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+noinst_LIBRARIES = libResolution.a
+
+AM_CPPFLAGS =
+AM_CPPFLAGS += -DRESOLUTION_X11
+AM_CPPFLAGS += @GTK_CPPFLAGS@
+
+libResolution_a_SOURCES =
+libResolution_a_SOURCES += resolution.c
+libResolution_a_SOURCES += resolutionX11.c
+libResolution_a_SOURCES += libvmwarectrl.c
diff --git a/open-vm-tools/lib/resolution/Makefile.in b/open-vm-tools/lib/resolution/Makefile.in
new file mode 100644 (file)
index 0000000..3eb9ba3
--- /dev/null
@@ -0,0 +1,483 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2007 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/resolution
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libResolution_a_AR = $(AR) $(ARFLAGS)
+libResolution_a_LIBADD =
+am_libResolution_a_OBJECTS = resolution.$(OBJEXT) \
+       resolutionX11.$(OBJEXT) libvmwarectrl.$(OBJEXT)
+libResolution_a_OBJECTS = $(am_libResolution_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libResolution_a_SOURCES)
+DIST_SOURCES = $(libResolution_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libResolution.a
+AM_CPPFLAGS = -DRESOLUTION_X11 @GTK_CPPFLAGS@
+libResolution_a_SOURCES = resolution.c resolutionX11.c libvmwarectrl.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/resolution/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/resolution/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libResolution.a: $(libResolution_a_OBJECTS) $(libResolution_a_DEPENDENCIES) 
+       -rm -f libResolution.a
+       $(libResolution_a_AR) libResolution.a $(libResolution_a_OBJECTS) $(libResolution_a_LIBADD)
+       $(RANLIB) libResolution.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmwarectrl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolution.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolutionX11.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/lib/resolution/libvmwarectrl.c b/open-vm-tools/lib/resolution/libvmwarectrl.c
new file mode 100644 (file)
index 0000000..80abd41
--- /dev/null
@@ -0,0 +1,275 @@
+/*
+ * Copyright 2006 by VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * libvmwarectrl.c --
+ *
+ *      The VMWARE_CTRL client library.
+ */
+
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+#include <X11/Xlibint.h>
+#include "libvmwarectrl.h"
+#include "vmwarectrlproto.h"
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+
+
+/*
+ * Static data and functions.
+ */
+static XExtensionInfo _vmwarectrl_info_data;
+static XExtensionInfo *vmwarectrl_info = &_vmwarectrl_info_data;
+static char *vmwarectrl_extension_name = VMWARE_CTRL_PROTOCOL_NAME;
+
+#define VMwareCtrlCheckExtension(dpy, i, val) \
+  XextCheckExtension(dpy, i, vmwarectrl_extension_name, val)
+
+static int close_display(Display *dpy, XExtCodes *codes);
+
+static /* const */ XExtensionHooks vmwarectrl_extension_hooks = {
+    NULL,          /* create_gc */
+    NULL,          /* copy_gc */
+    NULL,          /* flush_gc */
+    NULL,          /* free_gc */
+    NULL,          /* create_font */
+    NULL,          /* free_font */
+    close_display, /* close_display */
+    NULL,          /* wire_to_event */
+    NULL,          /* event_to_wire */
+    NULL,          /* error */
+    NULL,          /* error_string */
+};
+
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, vmwarectrl_info)
+
+static XEXT_GENERATE_FIND_DISPLAY (find_display, vmwarectrl_info,
+                                  vmwarectrl_extension_name,
+                                  &vmwarectrl_extension_hooks,
+                                  0, NULL)
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * VMwareCtrl_QueryExtension --
+ *
+ *      Standard QueryExtension implementation. Not very interesting for
+ *      VMWARE_CTRL as it doesn't define any events or errors.
+ *
+ * Results:
+ *      True if information is successfully retrieved. False otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+VMwareCtrl_QueryExtension(Display *dpy,     // IN:
+                          int *event_basep, // OUT:
+                          int *error_basep) // OUT:
+{
+   XExtDisplayInfo *info = find_display(dpy);
+
+   if (XextHasExtension(info)) {
+      *event_basep = info->codes->first_event;
+      *error_basep = info->codes->first_error;
+      return True;
+   } else {
+      return False;
+   }
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * VMwareCtrl_QueryVersion --
+ *
+ *      Send the QueryVersion command to the driver and return the results.
+ *
+ * Results:
+ *      True if information is successfully retrieved. False otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+VMwareCtrl_QueryVersion(Display *dpy,      // IN:
+                        int *majorVersion, // OUT:
+                        int *minorVersion) // OUT:
+{
+   xVMwareCtrlQueryVersionReply rep;
+   xVMwareCtrlQueryVersionReq *req;
+   XExtDisplayInfo *info = find_display(dpy);
+   Bool ret = False;
+
+   VMwareCtrlCheckExtension(dpy, info, False);
+   LockDisplay(dpy);
+
+   GetReq(VMwareCtrlQueryVersion, req);
+   req->reqType = info->codes->major_opcode;
+   req->VMwareCtrlReqType = X_VMwareCtrlQueryVersion;
+
+   if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+      goto exit;
+   }
+   *majorVersion = rep.majorVersion;
+   *minorVersion = rep.minorVersion;
+
+   ret = True;
+
+exit:
+   UnlockDisplay(dpy);
+   SyncHandle();
+
+   return ret;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * VMwareCtrl_SetRes --
+ *
+ *      Send the SetRes command to the driver.
+ *
+ * Results:
+ *      True if the resolution was set. False otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+Bool
+VMwareCtrl_SetRes(Display *dpy, // IN:
+                  int screen,   // IN:
+                  int x,        // IN:
+                  int y)        // IN:
+{
+   xVMwareCtrlSetResReply rep;
+   xVMwareCtrlSetResReq *req;
+   XExtDisplayInfo *info = find_display(dpy);
+   Bool ret = False;
+
+   VMwareCtrlCheckExtension(dpy, info, False);
+   LockDisplay(dpy);
+
+   GetReq(VMwareCtrlSetRes, req);
+   req->reqType = info->codes->major_opcode;
+   req->VMwareCtrlReqType = X_VMwareCtrlSetRes;
+   req->screen = screen;
+   req->x = x;
+   req->y = y;
+
+   if (!_XReply(dpy, (xReply *)&rep,
+                (SIZEOF(xVMwareCtrlSetResReply) - SIZEOF(xReply)) >> 2,
+                xFalse)) {
+      goto exit;
+   }
+
+   ret = True;
+
+exit:
+   UnlockDisplay(dpy);
+   SyncHandle();
+
+   return ret;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * VMwareCtrl_SetTopology --
+ *
+ *      Send the SetTopology command to the driver.
+ *
+ *      Solaris 10 uses a different Xinerama standard than expected here. As a
+ *      result, topology set is not supported and this function is excluded from
+ *      Solaris builds.
+ *
+ * Results:
+ *      True if the resolution and xinerama topology were set. False otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+#ifndef NO_MULTIMON
+Bool
+VMwareCtrl_SetTopology(Display *dpy,          // IN:
+                       int screen,            // IN:
+                       xXineramaScreenInfo extents[], // IN:
+                       int number)            // IN:
+{
+   xVMwareCtrlSetTopologyReply rep;
+   xVMwareCtrlSetTopologyReq *req;
+   XExtDisplayInfo *info = find_display(dpy);
+   Bool ret = False;
+   long len;
+
+   VMwareCtrlCheckExtension(dpy, info, False);
+   LockDisplay(dpy);
+
+   GetReq(VMwareCtrlSetTopology, req);
+   req->reqType = info->codes->major_opcode;
+   req->VMwareCtrlReqType = X_VMwareCtrlSetTopology;
+   req->screen = screen;
+   req->number = number;
+
+   len = ((long) number) << 1;
+   SetReqLen(req, len, len);
+   len <<= 2;
+   _XSend(dpy, (char *)extents, len);
+
+   if (!_XReply(dpy, (xReply *)&rep,
+                (SIZEOF(xVMwareCtrlSetTopologyReply) - SIZEOF(xReply)) >> 2,
+                xFalse)) {
+      goto exit;
+   }
+
+   ret = True;
+
+exit:
+   UnlockDisplay(dpy);
+   SyncHandle();
+
+   return ret;
+}
+#endif
diff --git a/open-vm-tools/lib/resolution/libvmwarectrl.h b/open-vm-tools/lib/resolution/libvmwarectrl.h
new file mode 100644 (file)
index 0000000..83ae096
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2006 by VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * libvmwarectrl.c --
+ *
+ *      The VMWARE_CTRL client library.
+ */
+
+
+#ifndef _LIB_VMWARE_CTRL_H_
+#define _LIB_VMWARE_CTRL_H_
+
+#include <X11/X.h>
+#include <X11/Xmd.h>
+#ifndef NO_MULTIMON
+#include <X11/extensions/panoramiXproto.h>
+#endif
+
+Bool VMwareCtrl_QueryExtension(Display *dpy, int *event_basep, int *error_basep);
+Bool VMwareCtrl_QueryVersion(Display *dpy, int *majorVersion, int *minorVersion);
+Bool VMwareCtrl_SetRes(Display *dpy, int screen, int x, int y);
+#ifndef  NO_MULTIMON
+Bool VMwareCtrl_SetTopology(Display *dpy, int screen, xXineramaScreenInfo[], int number);
+#endif
+
+#endif /* _LIB_VMWARE_CTRL_H_ */
diff --git a/open-vm-tools/lib/resolution/resolution.c b/open-vm-tools/lib/resolution/resolution.c
new file mode 100644 (file)
index 0000000..4a13910
--- /dev/null
@@ -0,0 +1,396 @@
+/*********************************************************
+ * Copyright (C) 2005 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * resolution.c --
+ *
+ *     Set of functions to handle guest screen resizing for
+ *     vmware-{user,guestd}.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "vmware.h"
+#include "vm_app.h"
+#include "debug.h"
+#include "rpcout.h"
+#include "str.h"
+#include "strutil.h"
+
+#include "resolutionInt.h"
+#include "resolution.h"
+
+
+/*
+ * Internal global variables
+ */
+
+Bool     gCanSetResolution;     // Initialized via ResolutionBackendInit()
+Bool     gCanSetTopology;       // Initialized via ResolutionBackendInit()
+
+/*
+ * Must either be TOOLS_DAEMON_NAME or TOOLS_DND_NAME.  See vm_app.h.
+ */
+static char     gTcloChannel[MAX(sizeof TOOLS_DAEMON_NAME,
+                                 sizeof TOOLS_DND_NAME)];
+
+
+/*
+ * Local function prototypes
+ */
+
+static Bool     ResolutionRpcInSetCB(char const **result, size_t *resultLen,
+                                     const char *name, const char *args,
+                                     size_t argsSize, void *clientData);
+static Bool     TopologyRpcInSetCB(char const **result, size_t *resultLen,
+                                   const char *name, const char *args,
+                                   size_t argsSize, void *clientData);
+
+
+/*
+ * Global function definitions
+ */
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Resolution_Init --
+ *
+ *      Initialize the guest resolution library.
+ *
+ * Results:
+ *      TRUE on success, FALSE on failure (bad arguments?).
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+Resolution_Init(const char *tcloChannel,        // IN:
+                InitHandle handle)              // IN:
+{
+   gCanSetResolution = FALSE;
+   gCanSetTopology = FALSE;
+
+   ASSERT((strcmp(tcloChannel, TOOLS_DAEMON_NAME) == 0) ||
+          (strcmp(tcloChannel, TOOLS_DND_NAME)) == 0);
+
+   if (!ResolutionBackendInit(handle)) {
+      return FALSE;
+   }
+
+   strncpy(gTcloChannel, tcloChannel, sizeof gTcloChannel);
+   gTcloChannel[sizeof gTcloChannel - 1] = '\0';
+
+   return TRUE;
+}
+
+
+/*-----------------------------------------------------------------------------
+ *
+ * Resolution_Register --
+ *
+ *      Register the capability and resolution setting callbacks.
+ *
+ * Results:
+ *      TRUE on success, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+Resolution_Register(RpcIn *rpcIn)
+{
+   if (!rpcIn) {
+      return FALSE;
+   }
+
+   if (gCanSetResolution) {
+      RpcIn_RegisterCallback(rpcIn, "Resolution_Set", ResolutionRpcInSetCB, NULL);
+   }
+
+   if (gCanSetTopology) {
+      RpcIn_RegisterCallback(rpcIn, "DisplayTopology_Set", TopologyRpcInSetCB, NULL);
+   }
+
+   return Resolution_RegisterCapability();
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Resolution_RegisterCapability --
+ *
+ *      Register the "Resolution_Set" capability. Sometimes this needs to
+ *      be done separately from the TCLO callback registration, so we
+ *      provide it separately here.
+ *
+ * Results:
+ *      TRUE on success
+ *      FALSE on failure
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+Resolution_RegisterCapability(void)
+{
+   if (gCanSetResolution) {
+      if (!RpcOut_sendOne(NULL, NULL, "tools.capability.resolution_set 1")) {
+         Debug("%s: Unable to register resolution set capability\n",
+               __FUNCTION__);
+         return FALSE;
+      }
+
+      if (!RpcOut_sendOne(NULL, NULL, "tools.capability.resolution_server %s 1",
+                          gTcloChannel)) {
+         Debug("%s: Unable to register resolution server capability\n",
+               __FUNCTION__);
+
+         /* 
+          * Note that we do not return false so that we stay backwards 
+          * compatible with old vmx code (Workstation 6/ESX 3.5) that doesn't 
+          * handle resolution_server.
+          */
+      }
+   }
+
+   if (gCanSetTopology) {
+      if (!RpcOut_sendOne(NULL, NULL, "tools.capability.display_topology_set 2")) {
+         Debug("%s: Unable to register topology set capability\n",
+               __FUNCTION__);
+      }
+
+      if (!RpcOut_sendOne(NULL, NULL, "tools.capability.display_global_offset 1")) {
+         Debug("%s: Unable to register topology global offset capability\n",
+               __FUNCTION__);
+         /*
+          * Ignore failures - host may not support these RPCs.
+          */
+      }
+   }
+
+   return TRUE;
+}
+
+
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Resolution_UnregisterCapability --
+ *
+ *      Unregister the "Resolution_Set" capability.
+ *
+ * Results:
+ *      TRUE on success
+ *      FALSE on failure
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+Resolution_UnregisterCapability(void)
+{
+   /*
+    * RpcIn doesn't have an unregister facility, so all we need to do
+    * here is unregister the capability.
+    */
+
+   if (!RpcOut_sendOne(NULL, NULL, "tools.capability.resolution_set 0")) {
+      Debug("%s: Unable to unregister ResolutionSet capability\n", 
+           __FUNCTION__);
+      return FALSE;
+   }
+
+   if (!RpcOut_sendOne(NULL, NULL, "tools.capability.resolution_server %s 0",
+                      gTcloChannel)) {
+      Debug("%s: Unable to unregister resolution server capability\n",
+           __FUNCTION__);
+
+      /* 
+       * Don't return false here so that an older vmx (Workstation 6/ESX 3.5)
+       * that that supports resolution_set and not resolution_server will 
+       * still work.
+       */
+   }
+
+   if (gCanSetTopology &&
+       (!RpcOut_sendOne(NULL, NULL, "tools.capability.display_topology_set 0")
+        || !RpcOut_sendOne(NULL, NULL, "tools.capability.display_global_offset 0"))) {
+      Debug("%s: Unable to unregister TopologySet capability\n",
+           __FUNCTION__);
+      /*
+       * Ignore failures - host may not support these RPCs.
+       */
+   }
+
+   return TRUE;
+}
+
+
+/*
+ * Local function definitions
+ */
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * ResolutionRpcInSetCB  --
+ *
+ *      Handler for TCLO 'Resolution_Set'.
+ *
+ * Results:
+ *      TRUE if we can reply, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+ResolutionRpcInSetCB(char const **result,     // OUT
+                     size_t *resultLen,       // OUT
+                     const char *name,        // IN
+                     const char *args,        // IN
+                     size_t argsSize,         // unused
+                     void *clientData)        // unused
+
+{
+   uint32 width = 0 ;
+   uint32 height = 0;
+   unsigned int index = 0;
+
+   /* parse the width and height */
+   if (!StrUtil_GetNextUintToken(&width, &index, args, " ")) {
+      goto invalid_arguments;
+   }
+   if (!StrUtil_GetNextUintToken(&height, &index, args, "")) {
+      goto invalid_arguments;
+   }
+
+   return RpcIn_SetRetVals(result, resultLen, "",
+                           ResolutionSetResolution(width, height));
+
+invalid_arguments:
+   return RpcIn_SetRetVals(result, resultLen, "Invalid arguments", FALSE);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * TopologyRpcInSetCB  --
+ *
+ *      Handler for TCLO 'DisplayTopology_Set'.
+ *
+ *      Routine unmarshals RPC arguments and passes over to backend
+ *      TopologySet().
+ *
+ * Results:
+ *      TRUE if we can reply, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+TopologyRpcInSetCB(char const **result,     // OUT
+                   size_t *resultLen,       // OUT
+                   const char *name,        // IN
+                   const char *args,        // IN
+                   size_t argsSize,         // unused
+                   void *clientData)        // unused
+{
+   DisplayTopologyInfo *displays = NULL;
+   unsigned int count, i;
+   Bool success = FALSE;
+
+   /*
+    * The argument string will look something like:
+    *   <count> [ , <x> <y> <w> <h> ] * count.
+    *
+    * e.g.
+    *    3 , 0 0 640 480 , 640 0 800 600 , 0 480 640 480
+    */
+
+   if (sscanf(args, "%u", &count) != 1) {
+      return RpcIn_SetRetVals(result, resultLen,
+                              "Invalid arguments. Expected \"count\"",
+                              FALSE);
+   }
+
+
+
+   displays = malloc(sizeof *displays * count);
+   if (!displays) {
+      RpcIn_SetRetVals(result, resultLen,
+                       "Failed to alloc buffer for display info",
+                       FALSE);
+      goto out;
+   }
+
+   for (i = 0; i < count; i++) {
+      args = strchr(args, ',');
+      if (!args) {
+         RpcIn_SetRetVals(result, resultLen,
+                          "Expected comma separated display list",
+                          FALSE);
+         goto out;
+      }
+      args++; /* Skip past the , */
+
+      if (sscanf(args, " %d %d %d %d ", &displays[i].x,
+                 &displays[i].y, &displays[i].width, &displays[i].height) != 4) {
+         RpcIn_SetRetVals(result, resultLen,
+                          "Expected x, y, w, h in display entry",
+                          FALSE);
+         goto out;
+      }
+   }
+
+   success = ResolutionSetTopology(result, resultLen, count, displays);
+
+   if (success) {
+      RpcIn_SetRetVals(result, resultLen, "", TRUE);
+   }
+
+out:
+   free(displays);
+   return success;
+}
diff --git a/open-vm-tools/lib/resolution/resolutionInt.h b/open-vm-tools/lib/resolution/resolutionInt.h
new file mode 100644 (file)
index 0000000..c17fb8d
--- /dev/null
@@ -0,0 +1,74 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * resolutionInt.h --
+ *
+ *    Internal header file for lib/resolution.
+ */
+
+#ifndef _LIB_RESOLUTIONINT_H_
+#define _LIB_RESOLUTIONINT_H_
+
+#define INCLUDE_ALLOW_USERLEVEL
+#define INCLUDE_ALLOW_DISTRIBUTE
+#include "includeCheck.h"
+
+#include "resolution.h"
+
+
+/*
+ * Data types
+ */
+
+
+/*
+ * Describes the size and offset of a display.  An array of these
+ * structures describes the entire topology of the guest desktop
+ *
+ * NB: Cribbed from Win32 resolution code.  Refactor this.
+ */
+typedef struct {
+   int x;
+   int y;
+   int width;
+   int height;
+} DisplayTopologyInfo;
+
+
+/*
+ * Global variables
+ */
+
+extern Bool gCanSetResolution;  // Set to TRUE if initialized backend supports
+                                // Resolution_Set 
+extern Bool gCanSetTopology;    // Set to TRUE if " " " Topology_Set
+
+
+/*
+ * Global functions
+ */
+
+/* Defined per backend. */
+Bool ResolutionBackendInit(InitHandle handle);
+Bool ResolutionSetResolution(uint32 width, uint32 height);
+Bool ResolutionSetTopology(char const **result, size_t *resultLen,
+                           unsigned int ndisplays, DisplayTopologyInfo displays[]);
+
+
+#endif // ifndef _LIB_RESOLUTIONINT_H_
diff --git a/open-vm-tools/lib/resolution/resolutionX11.c b/open-vm-tools/lib/resolution/resolutionX11.c
new file mode 100644 (file)
index 0000000..6133bf5
--- /dev/null
@@ -0,0 +1,441 @@
+/*********************************************************
+ * Copyright (C) 2005 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * resolutionX11.c --
+ *
+ *     X11 backend for lib/resolution.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrandr.h>
+#ifndef NO_MULTIMON
+#include <X11/extensions/Xinerama.h>
+#endif
+#include <gdk/gdkx.h>
+#undef Bool
+
+#include "vmware.h"
+
+#include "resolution.h"
+#include "resolutionInt.h"
+
+#include "debug.h"
+#include "fileIO.h"
+#include "libvmwarectrl.h"
+#include "str.h"
+#include "strutil.h"
+
+#define VMWAREDRV_PATH_64   "/usr/X11R6/lib64/modules/drivers/vmware_drv.o"
+#define VMWAREDRV_PATH      "/usr/X11R6/lib/modules/drivers/vmware_drv.o"
+#define VERSION_STRING      "VMware Guest X Server"
+
+
+/*
+ * Global variables
+ */
+
+static Display *gXDisplay;
+static Window   gXRoot;
+static Bool     gCanUseVMwareCtrl;
+static Bool     gCanUseVMwareCtrlTopologySet;
+
+
+/*
+ * Local function prototypes
+ */
+
+static Bool ResolutionCanSet(void);
+static Bool TopologyCanSet(void);
+
+
+/*
+ * Global function definitions
+ */
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * ResolutionBackendInit --
+ *
+ *      X11 back-end initializer.  Records caller's X11 display, then determines
+ *      which capabilities are available.
+ *
+ * Results:
+ *      TRUE on success, FALSE on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+ResolutionBackendInit(InitHandle handle)  // IN: user's X11 display
+{
+   int major;   // throwaway variables
+   int minor;
+
+   gXDisplay = handle;
+
+   if (gXDisplay == NULL) {
+      Warning("%s: Called with invalid X display!\n", __func__);
+      return FALSE;
+   }
+
+   gXRoot = DefaultRootWindow(gXDisplay);
+   gCanUseVMwareCtrl = VMwareCtrl_QueryVersion(gXDisplay, &major, &minor);
+   gCanUseVMwareCtrlTopologySet = FALSE;
+
+   gCanSetResolution = ResolutionCanSet();
+   gCanSetTopology = TopologyCanSet();
+
+   return TRUE;
+}
+
+
+/*-----------------------------------------------------------------------------
+ *
+ * ResolutionSetResolution --
+ *
+ *      Given a width and height, find the biggest resolution that will "fit".
+ *      This is called as a result of the resolution set request from the vmx.
+ *
+ * Results:
+ *      TRUE if we are able to set to the exact size requested, FALSE otherwise.
+ *
+ * Side effects:
+ *      The screen resolution of will change.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+ResolutionSetResolution(uint32 width,  // IN
+                        uint32 height) // IN
+{
+   XRRScreenConfiguration* xrrConfig;
+   XRRScreenSize *xrrSizes;
+   Rotation xrrCurRotation;
+   uint32  xrrNumSizes;
+   uint32 i;
+   uint32 bestFitIndex = 0;
+   uint64 bestFitSize = 0;
+   uint64 potentialSize;
+
+   ASSERT(gCanSetResolution);
+
+   if (gCanUseVMwareCtrl) {
+      /*
+       * If so, use the VMWARE_CTRL extension to provide a custom resolution
+       * which we'll find as an exact match from XRRConfigSizes() (unless
+       * the resolution is too large).
+       *
+       * As such, we don't care if this succeeds or fails, we'll make a best
+       * effort attempt to change resolution anyway.
+       */
+      VMwareCtrl_SetRes(gXDisplay, DefaultScreen(gXDisplay), width, height);
+   }
+
+   xrrConfig = XRRGetScreenInfo(gXDisplay, gXRoot);
+   xrrSizes = XRRConfigSizes(xrrConfig, &xrrNumSizes);
+   XRRConfigCurrentConfiguration(xrrConfig, &xrrCurRotation);
+
+   /*
+    * Iterate thru the list finding the best fit that is still <= in both width 
+    * and height. 
+    */
+   for (i = 0; i < xrrNumSizes; i++) {
+      potentialSize = xrrSizes[i].width * xrrSizes[i].height;
+      if (xrrSizes[i].width <= width && xrrSizes[i].height <= height && 
+          potentialSize > bestFitSize ) {
+         bestFitSize = potentialSize;
+         bestFitIndex = i;
+      }
+   }
+
+   if (bestFitSize > 0) {
+      Debug("Setting guest resolution to: %dx%d (requested: %d, %d)\n",
+            xrrSizes[bestFitIndex].width, xrrSizes[bestFitIndex].height, width, height);
+      XRRSetScreenConfig(gXDisplay, xrrConfig, gXRoot, bestFitIndex, xrrCurRotation,
+                         GDK_CURRENT_TIME);
+   } else {
+      Debug("Can't find a suitable guest resolution, ignoring request for %dx%d\n",
+            width, height);
+   }
+
+   XRRFreeScreenConfigInfo(xrrConfig);
+   return xrrSizes[bestFitIndex].width == width && 
+          xrrSizes[bestFitIndex].height == height;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * ResolutionSetTopology --
+ *
+ *      Employs the Xinerama extension to declare a new display topology.
+ *
+ *      Solaris 10 uses a different Xinerama standard than expected here. As a
+ *      result, topology set is not supported and this function is excluded from
+ *      Solaris builds.
+ *
+ *      XXX With Solaris 10 shipping X.org, perhaps we should revisit this
+ *      decision.
+ *
+ * Results:
+ *      TRUE if operation succeeded, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+ResolutionSetTopology(char const **result,      // OUT: error message goes here
+                      size_t *resultLen,        // OUT: length of result
+                      unsigned int ndisplays,   // IN:  number of elements in topology
+                      DisplayTopologyInfo *topology) // IN: array of display geometries
+{
+#ifdef NO_MULTIMON
+   return FALSE;
+#else
+   Bool success = FALSE;
+   unsigned int i;
+   xXineramaScreenInfo *displays = NULL;
+   short maxX = 0;
+   short maxY = 0;
+   int minX = 0;
+   int minY = 0;
+
+   ASSERT(gCanSetTopology);
+
+   /*
+    * Allocate xXineramaScreenInfo array & translate from DisplayTopologyInfo.
+    * Iterate over displays looking for minimum, maximum dimensions.
+    * Warn if min isn't at (0,0).
+    * Transform to (0,0).
+    * Call out to VMwareCtrl_SetTopology.
+    * Set new jumbotron resolution.
+    */
+
+   displays = malloc(sizeof *displays * ndisplays);
+   if (!displays) {
+      goto out;
+   }
+
+   for (i = 0; i < ndisplays; i++) {
+      displays[i].x_org = topology[i].x;
+      displays[i].y_org = topology[i].y;
+      displays[i].width = topology[i].width;
+      displays[i].height = topology[i].height;
+
+      maxX = MAX(maxX, displays[i].x_org + displays[i].width);
+      maxY = MAX(maxY, displays[i].y_org + displays[i].height);
+      minX = MIN(minX, displays[i].x_org);
+      minY = MIN(minY, displays[i].y_org);
+   }
+
+   if (minX != 0 || minY != 0) {
+      Warning("The bounding box of the display topology does not have an "
+              "origin of (0,0)\n");
+   }
+
+   /*
+    * Transform the topology so that the bounding box has an origin of (0,0). Since the
+    * host is already supposed to pass a normalized topology, this should not have any
+    * effect.
+    */
+   for (i = 0; i < ndisplays; i++) {
+      displays[i].x_org -= minX;
+      displays[i].y_org -= minY;
+   }
+
+   if (!VMwareCtrl_SetTopology(gXDisplay, DefaultScreen(gXDisplay), displays,
+                               ndisplays)) {
+      RpcIn_SetRetVals(result, resultLen, "Failed to set topology in the driver.",
+                       FALSE);
+      goto out;
+   }
+
+   if (!ResolutionSetResolution(maxX - minX, maxY - minY)) {
+      RpcIn_SetRetVals(result, resultLen, "Failed to set new resolution.",
+                       FALSE);
+      goto out;
+   }
+
+   success = TRUE;
+
+out:
+   free(displays);
+   return success;
+#endif
+}
+
+
+/*
+ * Local function definitions
+ */
+
+
+/*-----------------------------------------------------------------------------
+ *
+ * ResolutionCanSet --
+ *
+ *      Is the VMware SVGA driver a high enough version to support resolution
+ *      changing? We check by searching the driver binary for a known version
+ *      string.
+ *
+ * Results:
+ *      TRUE if the driver version is high enough, FALSE otherwise.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+ResolutionCanSet(void)
+{
+   FileIODescriptor fd;
+   FileIOResult res;
+   int64 filePos = 0;
+   Bool keepSearching = TRUE;
+   Bool found = FALSE;
+   char buf[sizeof VERSION_STRING + 10]; // size of VERSION_STRING plus some extra for the version number
+   const char versionString[] = VERSION_STRING;
+   size_t bytesRead;
+   int32 major, minor, level;
+   unsigned int tokPos;
+
+   /* See if the randr X module is loaded */
+   if (!XRRQueryVersion(gXDisplay, &major, &minor) ) {
+      return FALSE;
+   }
+
+   /* See if the VMWARE_CTRL extension is supported */
+   if (gCanUseVMwareCtrl) {
+      return TRUE;
+   }
+
+   /*
+    * XXX: This check does not work with XOrg 6.9/7.0 for two reasons: Both
+    * versions now use .so for the driver extension and 7.0 moves the drivers
+    * to a completely different directory. As long as we ship a driver for
+    * 6.9/7.0, we can instead just use the VMWARE_CTRL check.
+    */
+   buf[sizeof buf - 1] = '\0';
+   FileIO_Invalidate(&fd);
+   res = FileIO_Open(&fd, VMWAREDRV_PATH_64, FILEIO_ACCESS_READ, FILEIO_OPEN);
+   if (res != FILEIO_SUCCESS) {
+      res = FileIO_Open(&fd, VMWAREDRV_PATH, FILEIO_ACCESS_READ, FILEIO_OPEN);
+   }
+   if (res == FILEIO_SUCCESS) {
+      /*
+       * One of the opens succeeded, so start searching thru the file.
+       */
+      while (keepSearching) {
+         res = FileIO_Read(&fd, buf, sizeof buf - 1, &bytesRead);
+         if (res != FILEIO_SUCCESS || bytesRead < sizeof buf -1 ) {
+            keepSearching = FALSE;
+         } else {
+            if (Str_Strncmp(versionString, buf, sizeof versionString - 1) == 0) {
+               keepSearching = FALSE;
+               found = TRUE;
+            }
+         }
+         filePos = FileIO_Seek(&fd, filePos+1, FILEIO_SEEK_BEGIN);
+         if (filePos == -1) {
+            keepSearching = FALSE;
+         }
+      }
+      FileIO_Close(&fd);
+      if (found) {
+         /*
+          * We NUL-terminated buf earlier, but Coverity really wants it to
+          * be NUL-terminated after the call to FileIO_Read (because
+          * FileIO_Read doesn't NUL-terminate). So we'll do it again.
+          */
+         buf[sizeof buf - 1] = '\0';
+
+         /*
+          * Try and parse the major, minor and level versions
+          */
+         tokPos = sizeof versionString - 1;
+         if (!StrUtil_GetNextIntToken(&major, &tokPos, buf, ".- ")) {
+            return FALSE;
+         }
+         if (!StrUtil_GetNextIntToken(&minor, &tokPos, buf, ".- ")) {
+            return FALSE;
+         }
+         if (!StrUtil_GetNextIntToken(&level, &tokPos, buf, ".- ")) {
+            return FALSE;
+         }
+
+         return ((major > 10) || (major == 10 && minor >= 11));
+      }
+   }
+   return FALSE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * TopologyCanSet --
+ *
+ *      Tests whether or not we can change display topology.
+ *
+ * Results:
+ *      TRUE if we're able to reset topology, otherwise FALSE.
+ *
+ * Side effects:
+ *      gCanUseVMwareCtrlTopologySet will be set to TRUE on success.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static Bool
+TopologyCanSet(void)
+{
+#ifdef NO_MULTIMON
+   gCanUseVMwareCtrlTopologySet = FALSE;
+#else
+   int major;
+   int minor;
+
+   if (gCanUseVMwareCtrl && XineramaQueryVersion(gXDisplay, &major, &minor)) {
+      /*
+       * We need both a new enough VMWARE_CTRL and Xinerama for this to work.
+       */
+      gCanUseVMwareCtrlTopologySet = (major > 0) || (major == 0 && minor >= 2);
+   } else {
+      gCanUseVMwareCtrlTopologySet = FALSE;
+   }
+#endif
+
+   return gCanUseVMwareCtrlTopologySet;
+}
diff --git a/open-vm-tools/lib/resolution/vmwarectrl.h b/open-vm-tools/lib/resolution/vmwarectrl.h
new file mode 100644 (file)
index 0000000..a671ae1
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 by VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * vmwarectrl.h --
+ *
+ *      The definitions used by the VMWARE_CTRL protocol extension that
+ *      allows X clients to communicate with the driver.
+ */
+
+
+#ifndef _VMWARE_CTRL_H_
+#define _VMWARE_CTRL_H_
+
+#define VMWARE_CTRL_PROTOCOL_NAME "VMWARE_CTRL"
+
+#define VMWARE_CTRL_MAJOR_VERSION 0
+#define VMWARE_CTRL_MINOR_VERSION 2
+
+#define X_VMwareCtrlQueryVersion 0
+#define X_VMwareCtrlSetRes 1
+#define X_VMwareCtrlSetTopology 2
+
+#endif /* _VMWARE_CTRL_H_ */
diff --git a/open-vm-tools/lib/resolution/vmwarectrlproto.h b/open-vm-tools/lib/resolution/vmwarectrlproto.h
new file mode 100644 (file)
index 0000000..76f157f
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2006 by VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * vmwarectrlproto.h --
+ *
+ *      The description of the VMWARE_CTRL protocol extension that
+ *      allows X clients to communicate with the driver.
+ */
+
+#ifndef _VMWARE_CTRL_PROTO_H_
+#define _VMWARE_CTRL_PROTO_H_
+
+
+#include <X11/X.h>
+#include "vmwarectrl.h"
+
+
+/*
+ * Requests and Replies
+ */
+
+/* Version 0.1 definitions. */
+
+typedef struct {
+   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
+   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlQueryVersion */
+   CARD16 length B16;
+   CARD32 majorVersion B32;
+   CARD32 minorVersion B32;
+} xVMwareCtrlQueryVersionReq;
+#define sz_xVMwareCtrlQueryVersionReq 12
+
+typedef struct {
+   BYTE    type; /* X_Reply */
+   BYTE    pad1;
+   CARD16  sequenceNumber B16;
+   CARD32  length B32;
+   CARD32  majorVersion B32;
+   CARD32  minorVersion B32;
+   CARD32  pad2 B32;
+   CARD32  pad3 B32;
+   CARD32  pad4 B32;
+   CARD32  pad5 B32;
+} xVMwareCtrlQueryVersionReply;
+#define sz_xVMwareCtrlQueryVersionReply 32
+
+typedef struct {
+   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
+   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlSetRes */
+   CARD16 length B16;
+   CARD32 screen B32;
+   CARD32 x B32;
+   CARD32 y B32;
+} xVMwareCtrlSetResReq;
+#define sz_xVMwareCtrlSetResReq 16
+
+typedef struct {
+   BYTE   type; /* X_Reply */
+   BYTE   pad1;
+   CARD16 sequenceNumber B16;
+   CARD32 length B32;
+   CARD32 screen B32;
+   CARD32 x B32;
+   CARD32 y B32;
+   CARD32 pad2 B32;
+   CARD32 pad3 B32;
+   CARD32 pad4 B32;
+} xVMwareCtrlSetResReply;
+#define sz_xVMwareCtrlSetResReply 32
+
+/* Version 0.2 definitions. */
+
+typedef struct {
+   CARD8  reqType;           /* always X_VMwareCtrlReqCode */
+   CARD8  VMwareCtrlReqType; /* always X_VMwareCtrlSetTopology */
+   CARD16 length B16;
+   CARD32 screen B32;
+   CARD32 number B32;
+   CARD32 pad1   B32;
+} xVMwareCtrlSetTopologyReq;
+#define sz_xVMwareCtrlSetTopologyReq 16
+
+typedef struct {
+   BYTE   type; /* X_Reply */
+   BYTE   pad1;
+   CARD16 sequenceNumber B16;
+   CARD32 length B32;
+   CARD32 screen B32;
+   CARD32 pad2   B32;
+   CARD32 pad3   B32;
+   CARD32 pad4   B32;
+   CARD32 pad5   B32;
+   CARD32 pad6   B32;
+} xVMwareCtrlSetTopologyReply;
+#define sz_xVMwareCtrlSetTopologyReply 32
+
+#endif /* _VMWARE_CTRL_PROTO_H_ */
index 4c6eb8626cee92d5f7c7addb03757ae4968a4fce..1c92c0925e6a0cff8f9f73c2a5fc737d2f04f66d 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 1c243ca62b25df77b0787c4be97faf9b111f1003..d894ace1bf2c05373aef18ea36bc94d78f1ed41d 100644 (file)
@@ -59,11 +59,21 @@ static DblLnkLst_Links *gTimerEventQueue;
  * The RpcIn object
  */
 
+typedef enum {
+    RPCIN_CB_OLD,
+    RPCIN_CB_NEW
+} RpcInCallbackType;
+
+
 /* The list of TCLO command callbacks we support */
 typedef struct RpcInCallbackList {
    const char *name;
    size_t length; /* Length of name so we don't have to strlen a lot */
-   RpcIn_Callback function;
+   RpcInCallbackType type;
+   union {
+      RpcIn_CallbackOld oldCb;
+      RpcIn_Callback newCb;
+   } callback;
    struct RpcInCallbackList *next;
    void *clientData;
 } RpcInCallbackList;
@@ -110,14 +120,9 @@ struct RpcIn {
  */
 
 static Bool
-RpcInPingCallback(char const **result, // OUT
-                  size_t *resultLen,   // OUT
-                  const char *name,    // IN
-                  const char *args,    // IN
-                  size_t argsSize,     // IN
-                  void *clientData)    // IN
+RpcInPingCallback(RpcInData *data)  // IN
 {
-   return RpcIn_SetRetVals(result, resultLen, "", TRUE);
+   return RPCIN_SETRETVALS(data, "", TRUE);
 }
 
 
@@ -374,10 +379,11 @@ RpcInLoop(void *clientData) // IN
       unsigned int status;
       char const *statusStr;
       unsigned int statusLen;
-      char const *result;
+      char *result;
       size_t resultLen;
       char *cmd;
       unsigned int index = 0;
+      Bool freeResult = FALSE;
       RpcInCallbackList *cb = NULL;
 
       /*
@@ -390,9 +396,23 @@ RpcInLoop(void *clientData) // IN
          free(cmd);
          if (cb) {
             result = NULL;
-            status = cb->function(&result, &resultLen, cb->name,
-                                  reply + cb->length, repLen - cb->length,
-                                  cb->clientData);
+            if (cb->type == RPCIN_CB_OLD) {
+               status = cb->callback.oldCb((char const **) &result, &resultLen, cb->name,
+                                           reply + cb->length, repLen - cb->length,
+                                           cb->clientData);
+            } else {
+               RpcInData data = { cb->name,
+                                  reply + cb->length,
+                                  repLen - cb->length,
+                                  NULL,
+                                  0,
+                                  FALSE,
+                                  cb->clientData };
+               status = cb->callback.newCb(&data);
+               result = data.result;
+               resultLen = data.resultLen;
+               freeResult = data.freeResult;
+            }
 
             ASSERT(result);
          } else {
@@ -422,6 +442,10 @@ RpcInLoop(void *clientData) // IN
       memcpy(in->last_result, statusStr, statusLen);
       memcpy(in->last_result + statusLen, result, resultLen);
       in->last_resultLen = statusLen + resultLen;
+      
+      if (freeResult) {
+         free(result);
+      }
 
 #if 0 /* Costly in non-debug cases --hpreg */
       if (strlen(reply) <= 128) {
@@ -539,10 +563,10 @@ RpcIn_start(RpcIn *in,                    // IN
 
    /* Register the 'reset' handler */
    if (resetCallback) {
-      RpcIn_RegisterCallback(in, "reset", resetCallback, resetClientData);
+      RpcIn_RegisterCallbackEx(in, "reset", resetCallback, resetClientData);
    }
 
-   RpcIn_RegisterCallback(in, "ping", RpcInPingCallback, NULL);
+   RpcIn_RegisterCallbackEx(in, "ping", RpcInPingCallback, NULL);
 
    return TRUE;
 
@@ -612,7 +636,7 @@ RpcIn_restart(RpcIn *in)  // IN
  *
  * RpcIn_RegisterCallback --
  *
- *      Register a callback to happen when a TCLO message is
+ *      Register an old-style callback to happen when a TCLO message is
  *      received. When a TCLO message beginning with 'name' is
  *      sent, the callback will be called with: the cmd name, the args
  *      (starting with the char directly after the cmd name; that's why
@@ -631,7 +655,7 @@ RpcIn_restart(RpcIn *in)  // IN
 void
 RpcIn_RegisterCallback(RpcIn *in,               // IN
                        const char *name,        // IN
-                       RpcIn_Callback callback, // IN
+                       RpcIn_CallbackOld cb,    // IN
                        void *clientData)        // IN
 {
    RpcInCallbackList *p;
@@ -640,7 +664,55 @@ RpcIn_RegisterCallback(RpcIn *in,               // IN
 
    ASSERT(in);
    ASSERT(name);
-   ASSERT(callback);
+   ASSERT(cb);
+   ASSERT(RpcInLookupCallback(in, name) == NULL); // not there yet
+
+   p = (RpcInCallbackList *) malloc(sizeof(RpcInCallbackList));
+   ASSERT_NOT_IMPLEMENTED(p);
+
+   p->length = strlen(name);
+   p->name = strdup(name);
+   p->type = RPCIN_CB_OLD;
+   p->callback.oldCb = cb;
+   p->clientData = clientData;
+
+   p->next = in->callbacks;
+
+   in->callbacks = p;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * RpcIn_RegisterCallbackEx --
+ *
+ *      Register a callback to happen when a TCLO message is
+ *      received. When a TCLO message beginning with 'name' is
+ *      sent, the callback will be called with an instance of
+ *      "RpcInData" with the information from the request.
+ *
+ * Results:
+ *      None
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+void
+RpcIn_RegisterCallbackEx(RpcIn *in,          // IN
+                         const char *name,   // IN
+                         RpcIn_Callback cb,  // IN
+                         void *clientData)   // IN
+{
+   RpcInCallbackList *p;
+
+   Debug("Registering callback '%s'\n", name);
+
+   ASSERT(in);
+   ASSERT(name);
+   ASSERT(cb);
    ASSERT(RpcInLookupCallback(in, name) == NULL); // not there yet
 
    p = (RpcInCallbackList *) malloc(sizeof(RpcInCallbackList));
@@ -648,7 +720,8 @@ RpcIn_RegisterCallback(RpcIn *in,               // IN
 
    p->length = strlen(name);
    p->name = strdup(name);
-   p->function = callback;
+   p->type = RPCIN_CB_NEW;
+   p->callback.newCb = cb;
    p->clientData = clientData;
 
    p->next = in->callbacks;
@@ -675,7 +748,7 @@ RpcIn_RegisterCallback(RpcIn *in,               // IN
 
 void
 RpcIn_UnregisterCallback(RpcIn *in,               // IN
-                         const char *name)        // IN                       
+                         const char *name)        // IN
 {
    RpcInCallbackList *cur, *prev;
 
@@ -687,7 +760,7 @@ RpcIn_UnregisterCallback(RpcIn *in,               // IN
    for (cur = in->callbacks, prev = NULL; cur && strcmp(cur->name, name);
         prev = cur, cur = cur->next);
 
-   /* 
+   /*
     * If we called UnregisterCallback on a name that doesn't exist, we
     * have a problem.
     */
@@ -738,4 +811,3 @@ RpcIn_SetRetVals(char const **result,   // OUT
    return retVal;
 }
 
-
index 36e45bad6280c42e6ff9e4585d48c40cdf7e4351..95ad2ebcd6719ffb2d919c1ec4741be24d1e972d 100644 (file)
@@ -165,6 +165,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index d56e41eecde9f31a51f34db8e99ed54171b517dc..9e6c7f6fdb69f90793a1b9d2e1078144bf3ef28d 100644 (file)
@@ -153,6 +153,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index cb13036855ede6fee47b34ec2e9c017eeab079c6..18cd29849e94c5727def7a9c3a2e9c9a75409853 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index ceecbf2c7bb3b787146a4a9d1c7aaccd4518e645..67b88a7c328c3ef01af8e3e3b6988fa2bb6da8b9 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 71b2dde442d0d7fd447d4def134058eb9067a619..a5115e26f4b01aff10933a6c927ee92a1a2e2f3d 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 82ddab538a9ff97f7419bb19be54d502edfde210..1245a039c362c02e410b7a215339b4d4a4b1b04f 100644 (file)
@@ -167,6 +167,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index b9ab445636006478fb946ae6abe243914ee38f0a..0073d5220890c76f73039615754ab60f466dcee5 100644 (file)
@@ -154,6 +154,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 7e5007f3a9186bcad6b95376fe463e6b7f860240..6096c2260ef7ae09f2796ff58647e424895fb831 100644 (file)
 
 #ifndef _WIN32
 extern int vasprintf(char **ptr, const char *f, va_list arg);
+/*
+ * Declare vswprintf on platforms where it's not known to exist.  We know
+ * it's available on glibc >= 2.2, FreeBSD >= 5.0, and all versions of 
+ * Solaris.
+ * (Re: Solaris, vswprintf has been present since Solaris 8, and we only
+ * support Solaris 9 and above, since that was the first release available
+ * for x86, so we just assume it's already there.)
+ *
+ * XXX Str_Vsnwprintf and friends are still protected by _WIN32 and
+ * GLIBC_VERSION_22.  I.e., even though they should be able to work on
+ * FreeBSD 5.0+ and Solaris 8+, they aren't made available there.
+ */
+#   if !(defined(GLIBC_VERSION_22) ||                                   \
+         (defined(__FreeBSD__) && (__FreeBSD_version >= 500000)) ||     \
+         defined(sun))
 extern int vswprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, va_list args);
-#endif
+#   endif
+#endif // _WIN32
 
 #ifdef N_PLAT_NLM
 extern int vsnprintf(char *buf, size_t len, const char *f, va_list arg);
@@ -117,6 +133,9 @@ Str_Vsnprintf(char *str,          // OUT
 {
    int retval;
 
+   ASSERT(str != NULL);
+   ASSERT(format != NULL);
+
 #ifndef HAS_BSD_PRINTF
    retval = vsnprintf(str, size, format, ap);
 #elif defined __linux__
@@ -184,6 +203,9 @@ Str_Snprintf(char *str,          // OUT
    int retval;
    va_list args;
 
+   ASSERT(str != NULL);
+   ASSERT(format != NULL);
+
    va_start(args, format);
    retval = Str_Vsnprintf(str, size, format, args);
    va_end(args);
@@ -215,10 +237,13 @@ Str_Strcpy(char *buf,       // OUT
    uint32 *stack = (uint32 *)&buf;
    size_t len;
 
+   ASSERT(buf != NULL);
+   ASSERT(src != NULL);
+
    len = strlen(src);
-   if (len >= maxSize) { 
+   if (len >= maxSize) {
       Panic("%s:%d Buffer too small 0x%x\n", __FILE__, __LINE__, stack[-1]);
-      ASSERT_BUG(5686, FALSE); 
+      ASSERT_BUG(5686, FALSE);
    }
    return memcpy(buf, src, len + 1);
 }
@@ -249,7 +274,8 @@ Str_Strnstr(const char *src,        // IN
    size_t subLen;
    const char *end;
 
-   ASSERT(src != NULL && sub != NULL);
+   ASSERT(src != NULL);
+   ASSERT(sub != NULL);
 
    if ((subLen = strlen(sub)) == 0) {
       return (char *) src;
@@ -295,6 +321,9 @@ Str_Strcat(char *buf,       // IN-OUT
    size_t bufLen;
    size_t srcLen;
 
+   ASSERT(buf != NULL);
+   ASSERT(src != NULL);
+
    bufLen = strlen(buf);
    srcLen = strlen(src);
 
@@ -334,8 +363,14 @@ Str_Strncat(char *buf,       // IN-OUT
             const char *src, // IN: String to append
             size_t n)        // IN: Max chars of src to append
 {
-   uint32 *stack = (uint32 *)&buf;
-   size_t bufLen = strlen(buf);
+   uint32 *stack; 
+   size_t bufLen; 
+
+   ASSERT(buf != NULL);
+   ASSERT(src != NULL);
+
+   stack = (uint32 *)&buf;
+   bufLen = strlen(buf);
 
    /*
     * Check bufLen + n first so we can avoid the second call to strlen
@@ -386,7 +421,7 @@ Str_Asprintf(size_t *length,       // OUT
 {
    va_list arguments;
    char *result;
-   
+
    va_start(arguments, format);
    result = Str_Vasprintf(length, format, arguments);
    va_end(arguments);
diff --git a/open-vm-tools/lib/stubs/Makefile.am b/open-vm-tools/lib/stubs/Makefile.am
new file mode 100644 (file)
index 0000000..a8f29e9
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+noinst_LIBRARIES = libStubs.a
+
+libStubs_a_SOURCES =
+libStubs_a_SOURCES += stub-config.c
+libStubs_a_SOURCES += stub-log.c
+libStubs_a_SOURCES += stub-warning.c
+libStubs_a_SOURCES += stub-user-msg.c
+libStubs_a_SOURCES += stub-user-panic.c
+
+SUBDIRS =
+SUBDIRS += shared
+
diff --git a/open-vm-tools/lib/stubs/Makefile.in b/open-vm-tools/lib/stubs/Makefile.in
new file mode 100644 (file)
index 0000000..ba19d8f
--- /dev/null
@@ -0,0 +1,601 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/stubs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libStubs_a_AR = $(AR) $(ARFLAGS)
+libStubs_a_LIBADD =
+am_libStubs_a_OBJECTS = stub-config.$(OBJEXT) stub-log.$(OBJEXT) \
+       stub-warning.$(OBJEXT) stub-user-msg.$(OBJEXT) \
+       stub-user-panic.$(OBJEXT)
+libStubs_a_OBJECTS = $(am_libStubs_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libStubs_a_SOURCES)
+DIST_SOURCES = $(libStubs_a_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libStubs.a
+libStubs_a_SOURCES = stub-config.c stub-log.c stub-warning.c \
+       stub-user-msg.c stub-user-panic.c
+SUBDIRS = shared
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/stubs/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/stubs/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libStubs.a: $(libStubs_a_OBJECTS) $(libStubs_a_DEPENDENCIES) 
+       -rm -f libStubs.a
+       $(libStubs_a_AR) libStubs.a $(libStubs_a_OBJECTS) $(libStubs_a_LIBADD)
+       $(RANLIB) libStubs.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-config.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-msg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-panic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-warning.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LIBRARIES)
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic clean-libtool \
+       clean-noinstLIBRARIES ctags ctags-recursive distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/lib/stubs/shared/Makefile.am b/open-vm-tools/lib/stubs/shared/Makefile.am
new file mode 100644 (file)
index 0000000..1caf14f
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+noinst_LTLIBRARIES = libStubs.la
+
+libStubs_la_SOURCES =
+libStubs_la_SOURCES += ../stub-config.c
+libStubs_la_SOURCES += ../stub-log.c
+libStubs_la_SOURCES += ../stub-warning.c
+libStubs_la_SOURCES += ../stub-user-msg.c
+libStubs_la_SOURCES += ../stub-user-panic.c
+
diff --git a/open-vm-tools/lib/stubs/shared/Makefile.in b/open-vm-tools/lib/stubs/shared/Makefile.in
new file mode 100644 (file)
index 0000000..7cb2fed
--- /dev/null
@@ -0,0 +1,522 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+################################################################################
+### Copyright 2008 VMware, Inc.  All rights reserved.
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of version 2 of the GNU General Public License as
+### published by the Free Software Foundation.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+################################################################################
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = lib/stubs/shared
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libStubs_la_LIBADD =
+am_libStubs_la_OBJECTS = stub-config.lo stub-log.lo stub-warning.lo \
+       stub-user-msg.lo stub-user-panic.lo
+libStubs_la_OBJECTS = $(am_libStubs_la_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libStubs_la_SOURCES)
+DIST_SOURCES = $(libStubs_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMMON_XLIBS = @COMMON_XLIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DNET_CONFIG = @DNET_CONFIG@
+DNET_CPPFLAGS = @DNET_CPPFLAGS@
+DNET_LIBS = @DNET_LIBS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CPPFLAGS = @GTK_CPPFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GUESTD_LDADD = @GUESTD_LDADD@
+HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_CPPFLAGS = @ICU_CPPFLAGS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@
+LIB_FILE_CPPFLAGS = @LIB_FILE_CPPFLAGS@
+LIB_HGFS_SERVER_CPPFLAGS = @LIB_HGFS_SERVER_CPPFLAGS@
+LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@
+LIB_MISC_CPPFLAGS = @LIB_MISC_CPPFLAGS@
+LIB_PROC_MGR_CPPFLAGS = @LIB_PROC_MGR_CPPFLAGS@
+LIB_STRING_CPPFLAGS = @LIB_STRING_CPPFLAGS@
+LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MODULES = @MODULES@
+MODULES_DIR = @MODULES_DIR@
+MODULES_OS = @MODULES_OS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_PREFIX = @PAM_PREFIX@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
+PROCPS_LIBS = @PROCPS_LIBS@
+RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TARGET_OS = @TARGET_OS@
+VERSION = @VERSION@
+VMWARE_USER_CPPFLAGS = @VMWARE_USER_CPPFLAGS@
+VMWARE_USER_LDADD = @VMWARE_USER_LDADD@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libStubs.la
+libStubs_la_SOURCES = ../stub-config.c ../stub-log.c ../stub-warning.c \
+       ../stub-user-msg.c ../stub-user-panic.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/stubs/shared/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/stubs/shared/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libStubs.la: $(libStubs_la_OBJECTS) $(libStubs_la_DEPENDENCIES) 
+       $(LINK)  $(libStubs_la_OBJECTS) $(libStubs_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-config.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-msg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-panic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-warning.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+stub-config.lo: ../stub-config.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stub-config.lo -MD -MP -MF $(DEPDIR)/stub-config.Tpo -c -o stub-config.lo `test -f '../stub-config.c' || echo '$(srcdir)/'`../stub-config.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/stub-config.Tpo $(DEPDIR)/stub-config.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='../stub-config.c' object='stub-config.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stub-config.lo `test -f '../stub-config.c' || echo '$(srcdir)/'`../stub-config.c
+
+stub-log.lo: ../stub-log.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stub-log.lo -MD -MP -MF $(DEPDIR)/stub-log.Tpo -c -o stub-log.lo `test -f '../stub-log.c' || echo '$(srcdir)/'`../stub-log.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/stub-log.Tpo $(DEPDIR)/stub-log.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='../stub-log.c' object='stub-log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stub-log.lo `test -f '../stub-log.c' || echo '$(srcdir)/'`../stub-log.c
+
+stub-warning.lo: ../stub-warning.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stub-warning.lo -MD -MP -MF $(DEPDIR)/stub-warning.Tpo -c -o stub-warning.lo `test -f '../stub-warning.c' || echo '$(srcdir)/'`../stub-warning.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/stub-warning.Tpo $(DEPDIR)/stub-warning.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='../stub-warning.c' object='stub-warning.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stub-warning.lo `test -f '../stub-warning.c' || echo '$(srcdir)/'`../stub-warning.c
+
+stub-user-msg.lo: ../stub-user-msg.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stub-user-msg.lo -MD -MP -MF $(DEPDIR)/stub-user-msg.Tpo -c -o stub-user-msg.lo `test -f '../stub-user-msg.c' || echo '$(srcdir)/'`../stub-user-msg.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/stub-user-msg.Tpo $(DEPDIR)/stub-user-msg.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='../stub-user-msg.c' object='stub-user-msg.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stub-user-msg.lo `test -f '../stub-user-msg.c' || echo '$(srcdir)/'`../stub-user-msg.c
+
+stub-user-panic.lo: ../stub-user-panic.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stub-user-panic.lo -MD -MP -MF $(DEPDIR)/stub-user-panic.Tpo -c -o stub-user-panic.lo `test -f '../stub-user-panic.c' || echo '$(srcdir)/'`../stub-user-panic.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/stub-user-panic.Tpo $(DEPDIR)/stub-user-panic.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='../stub-user-panic.c' object='stub-user-panic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stub-user-panic.lo `test -f '../stub-user-panic.c' || echo '$(srcdir)/'`../stub-user-panic.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/open-vm-tools/lib/stubs/stub-config.c b/open-vm-tools/lib/stubs/stub-config.c
new file mode 100644 (file)
index 0000000..5f5c04b
--- /dev/null
@@ -0,0 +1,79 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-config.c --
+ *
+ *   Stubs for lib/config.
+ *
+ */
+
+#include "vm_assert.h"
+#include "config.h"
+#include "preference.h"
+
+
+Bool
+Config_GetBool(Bool defaultValue,
+               const char *fmt,
+               ...)
+{
+   return defaultValue;
+}
+
+
+int32
+Config_GetLong(int32 defaultValue,
+               const char *fmt,
+               ...)
+{
+   return defaultValue;
+}
+
+
+char *
+Config_GetString(const char *defaultValue,
+                 const char *fmt, ...)
+{
+   return (char *) defaultValue;
+}
+
+
+Bool
+Preference_GetBool(Bool defaultValue,
+                   const char *name)
+{
+   return defaultValue;
+}
+
+
+char *
+Preference_GetString(const char *defaultValue,
+                     const char *name)
+{
+   return (char *) defaultValue;
+}
+
+
+char *
+Preference_GetPathName(const char *defaultValue,
+                       const char *fmt)
+{
+   return (char *) defaultValue;
+}
+
diff --git a/open-vm-tools/lib/stubs/stub-log.c b/open-vm-tools/lib/stubs/stub-log.c
new file mode 100644 (file)
index 0000000..02ee12f
--- /dev/null
@@ -0,0 +1,72 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-log.c --
+ *
+ *   Stub for lib/log.
+ *
+ */
+
+#include <stdio.h>
+#include "str.h"
+
+
+/*
+ * XXX: the check is a hack to work around stupid libraries, like
+ * bora/lib/install, that provide implementations for only some of
+ * the functions of the real library, but not all.
+ */
+#if !defined(NO_LOG_STUB)
+void
+Log(const char *fmt,
+    ...)
+{
+   char *str;
+   va_list args;
+
+   va_start(args, fmt);
+   str = Str_Vasprintf(NULL, fmt, args);
+   if (str != NULL) {
+      fputs(str, stderr);
+   }
+   va_end(args);
+}
+#endif
+
+
+void
+Log_DisableThrottling(void)
+{
+
+}
+
+
+const char *
+Log_GetFileName(void)
+{
+   return NULL;
+}
+
+
+void
+Log_SetAlwaysKeep(Bool alwaysKeep)
+{
+
+}
+
diff --git a/open-vm-tools/lib/stubs/stub-user-msg.c b/open-vm-tools/lib/stubs/stub-user-msg.c
new file mode 100644 (file)
index 0000000..6386b65
--- /dev/null
@@ -0,0 +1,78 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-user-msg.c --
+ *
+ *   Stubs for Msg_* functions in lib/user.
+ *
+ */
+
+#include "vm_assert.h"
+#include "msg.h"
+#include "str.h"
+
+
+void
+Msg_Append(const char *fmt,
+           ...)
+{
+   static char buf[1000];
+
+   va_list args;
+   va_start(args, fmt);
+   Str_Vsnprintf(buf, sizeof buf, fmt, args);
+   va_end(args);
+
+   Warning("Msg_Append: %s\n", buf);
+}
+
+
+void
+Msg_Post(MsgSeverity severity,
+         const char *idFmt, ...)
+{
+   NOT_IMPLEMENTED();
+}
+
+
+unsigned int
+Msg_Question(Msg_String const *buttons,
+             int defaultAnswer,
+             char const *fmt,
+             ...)
+{
+   static char buf[1000];
+
+   va_list args;
+   va_start(args, fmt);
+   Str_Vsnprintf(buf, sizeof buf, fmt, args);
+   va_end(args);
+
+   Warning("Msg_Question: %s\n", buf);
+
+   return (unsigned int) defaultAnswer;
+}
+
+
+void
+Msg_Reset(Bool log)
+{
+   NOT_IMPLEMENTED();
+}
+
diff --git a/open-vm-tools/lib/stubs/stub-user-panic.c b/open-vm-tools/lib/stubs/stub-user-panic.c
new file mode 100644 (file)
index 0000000..76ecc2e
--- /dev/null
@@ -0,0 +1,48 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-user-panic.c --
+ *
+ *   Stubs for Panic_* functions in lib/user.
+ *
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "vmware.h"
+#include "panic.h"
+#include "str.h"
+
+
+void
+Panic_PostPanicMsg(const char *fmt, ...)
+{
+   char *str;
+   va_list args;
+
+   va_start(args, fmt);
+   str = Str_Vasprintf(NULL, fmt, args);
+   va_end(args);
+
+   if (str != NULL) {
+      fputs(str, stderr);
+   }
+}
+
diff --git a/open-vm-tools/lib/stubs/stub-warning.c b/open-vm-tools/lib/stubs/stub-warning.c
new file mode 100644 (file)
index 0000000..9da0b50
--- /dev/null
@@ -0,0 +1,44 @@
+/*********************************************************
+ * Copyright (C) 2008 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * stub-warning.c --
+ *
+ *   Stub for Warning().
+ *
+ */
+
+#include <stdio.h>
+#include "str.h"
+
+
+void
+Warning(const char *fmt, ...)
+{
+   char *str;
+   va_list args;
+
+   va_start(args, fmt);
+   str = Str_Vasprintf(NULL, fmt, args);
+   va_end(args);
+
+   if (str != NULL) {
+      fputs(str, stderr);
+   }
+}
+
index 1afcc6aa13a0496d9be607c02265268d8a791d3d..70944b7d5984caff9c0e50b2365034e7dce35ab1 100644 (file)
@@ -165,6 +165,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 231eb32dcb04f97e543711804ade1174f3987224..f484cc206bcc8b5da261cdaeabff1ef3a290001d 100644 (file)
@@ -153,6 +153,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 295d26faf3b14313923ec6c370a534775a617373..e0a84ffd5ed6c04bb9cc60a79841aacb5f531d98 100644 (file)
@@ -120,7 +120,7 @@ SyncMutex_Lock(SyncMutex *that) // IN
    WaitOnLocalSemaphore(that->semaphoreHandle);
 #else
 #if defined(VMX86_DEVEL)
-#define RETRY_TIMEOUT_MS -1 // Infinite time out to catch bug #23716 (devel)
+#define RETRY_TIMEOUT_MS (-1) // Infinite time out to catch bug #23716 (devel)
 #else
 #define RETRY_TIMEOUT_MS 5000 // Workaround for bug #23716
 #endif
index 0ee830fb40aac6dbea22fafe538d72ffa32dcf98..daa005531adcf11ba93c8c13e29c45f572f487b4 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index b548d64cf4a236bf0b652fa5c975e150bc46d180..2666b1d03085e3b281b8bc480faea47cb7265418 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 450b377c988ac7e6a7b1110c08e61a63f5d5d469..1ea8a7a99a915bada94a8ab690816ab72f8f7cb2 100644 (file)
@@ -26,7 +26,7 @@
  *
  */
 
-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(sun) && !defined(__APPLE__)
 #   error This file should not be compiled
 #endif
 
index 8992396ab9f0d250ac1594d06af94e8ea89e989b..86497168144cd870fb06bff4790e1080660101b6 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 28bb2e9665ffb088a7c4c8d1e1c7c22cf76dc234..f38155bb9d69e537cd735b2ff87162748cb8f145 100644 (file)
@@ -165,6 +165,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index fd575fbeb5600423f816cb8c859112bca7cb24e8..17c88c62114dafe63bac8578ef3c3074e69feb17 100644 (file)
@@ -81,29 +81,7 @@ Unicode_EscapeBuffer(const void *buffer,      // IN
    encoding = Unicode_ResolveEncoding(encoding);
 
    if (lengthInBytes == -1) {
-      switch (encoding) {
-      case STRING_ENCODING_UTF16:
-      case STRING_ENCODING_UTF16_LE:
-      case STRING_ENCODING_UTF16_BE:
-         lengthInBytes = Unicode_UTF16Strlen((const utf16_t *)buffer) * 2;
-         break;
-      case STRING_ENCODING_UTF32:
-      case STRING_ENCODING_UTF32_LE:
-      case STRING_ENCODING_UTF32_BE:
-         {
-            const uint32 *utf32 = (const uint32 *)buffer;
-            ssize_t numCodeUnits;
-
-            for (numCodeUnits = 0; utf32[numCodeUnits]; numCodeUnits++) {
-               // Count the number of code units until we hit NUL.
-            }
-
-            lengthInBytes = numCodeUnits * 4;
-         }
-      default:
-         lengthInBytes = strlen((const char *)buffer);
-         break;
-      }
+      lengthInBytes = Unicode_LengthInBytes(buffer, encoding);
    }
 
    /*
@@ -145,17 +123,26 @@ UnicodeSanityCheck(const void *buffer,      // IN
     * Sanity check US-ASCII here, so we can fast-path its conversion
     * to Unicode later.
     */
+
    if (encoding == STRING_ENCODING_US_ASCII) {
       const uint8 *asciiBytes = (const uint8 *)buffer;
-      Bool nulTerminated = (lengthInBytes == -1);
-      ssize_t i;
 
-      for (i = 0; nulTerminated ? asciiBytes[i] : i < lengthInBytes; i++) {
-         if (asciiBytes[i] >= 0x80) {
-            return FALSE;
-         }
+      if (lengthInBytes == -1) {
+        for (; *asciiBytes != '\0'; asciiBytes++) {
+           if (*asciiBytes >= 0x80) {
+              return FALSE;
+           }
+        }
+      } else {
+        ssize_t i;
+        for (i = 0; i < lengthInBytes; i++) {
+           if (asciiBytes[i] >= 0x80) {
+              return FALSE;
+           }
+        }
       }
    }
+
    return TRUE;
 }
 
@@ -217,6 +204,60 @@ UnicodePinIndices(ConstUnicode str,         // IN
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Unicode_LengthInBytes --
+ *
+ *      Compute the length in bytes of a string in a given encoding.
+ *
+ * Results:
+ *      The number of bytes.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+ssize_t
+Unicode_LengthInBytes(const void *buffer,      // IN
+                      StringEncoding encoding) // IN
+{
+   ssize_t len;
+
+   encoding = Unicode_ResolveEncoding(encoding);
+
+   switch (encoding) {
+   case STRING_ENCODING_UTF32_LE:
+   case STRING_ENCODING_UTF32_BE:
+   case STRING_ENCODING_UTF32_XE:
+   {
+      const int32 *p;
+      for (p = buffer; *p != 0; p++) {
+      }
+      len = (const char *) p - (const char *) buffer;
+      break;
+   }
+   case STRING_ENCODING_UTF16_LE:
+   case STRING_ENCODING_UTF16_BE:
+   case STRING_ENCODING_UTF16_XE:
+   {
+      const utf16_t *p;
+      for (p = buffer; *p != 0; p++) {
+      }
+      len = (const char *) p - (const char *) buffer;
+      break;
+   }
+   default:
+      // XXX assume 8-bit encoding with no embedded null
+      len = strlen(buffer);
+   }
+
+   return len;
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -323,6 +364,7 @@ Unicode_AllocWithLength(const void *buffer,      // IN
                         StringEncoding encoding) // IN
 {
    char *escapedBuffer;
+   Unicode result;
 
    ASSERT(lengthInBytes >= 0 || lengthInBytes == -1);
 
@@ -332,12 +374,13 @@ Unicode_AllocWithLength(const void *buffer,      // IN
    }
 
    encoding = Unicode_ResolveEncoding(encoding);
+   if (lengthInBytes == -1) {
+      lengthInBytes = Unicode_LengthInBytes(buffer, encoding);
+   }
 
-   if (UnicodeSanityCheck(buffer, lengthInBytes, encoding)) {
-      Unicode result = UnicodeAllocInternal(buffer, lengthInBytes, encoding);
-      if (result != NULL) {
-        return result;
-      }
+   result = UnicodeAllocInternal(buffer, lengthInBytes, encoding, FALSE);
+   if (result != NULL) {
+      return result;
    }
 
    /*
@@ -355,55 +398,6 @@ Unicode_AllocWithLength(const void *buffer,      // IN
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *
- * Unicode_IsBufferValid --
- *
- *      Tests if the given buffer is valid in the specified encoding.
- *
- *      If lengthInBytes is -1, then buffer must be NUL-terminated.
- *      Otherwise, buffer must be of the specified length, but does
- *      not need to be NUL-terminated.
- *
- * Results:
- *      TRUE if the buffer is valid, FALSE if it's not.
- *
- * Side effects:
- *      None
- *
- *-----------------------------------------------------------------------------
- */
-
-Bool
-Unicode_IsBufferValid(const void *buffer,      // IN
-                      ssize_t lengthInBytes,   // IN
-                      StringEncoding encoding) // IN
-{
-   Unicode result;
-
-   if (buffer == NULL) {
-      ASSERT(lengthInBytes <= 0);
-      return TRUE;
-   }
-
-   encoding = Unicode_ResolveEncoding(encoding);
-
-   if (!UnicodeSanityCheck(buffer, lengthInBytes, encoding)) {
-      return FALSE;
-   }
-
-   result = UnicodeAllocInternal(buffer, lengthInBytes, encoding);
-
-   if (!result) {
-      return FALSE;
-   } else {
-      Unicode_Free(result);
-      return TRUE;
-   }
-}
-
-
 /*
  *-----------------------------------------------------------------------------
  *
index 564db2b114543e035339f50e734619d6a0ad7448..0acbccdb4c25d290bc3fb5843fc19ae512b16cb7 100644 (file)
 #include "unicodeBase.h"
 #include "unicodeInt.h"
 
+
 /*
  * Padding for initial and final bytes used by an encoding.  The value
  * comes from ICU's UCNV_GET_MAX_BYTES_FOR_STRING macro and accounts
  * for leading and trailing bytes and NUL.
  */
+
 static const size_t UNICODE_UTF16_CODE_UNITS_PADDING = 10;
 
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -62,11 +65,15 @@ static const size_t UNICODE_UTF16_CODE_UNITS_PADDING = 10;
  *      Otherwise, buffer must be of the specified length, but does
  *      not need to be NUL-terminated.
  *
- *      Note that regardless of the encoding of the buffer passed to this
- *      function, the returned string can hold any Unicode characters.
+ *      Return NULL on memory allocation failure.
+ *
+ *      Return NULL if strict is true and the buffer contains an invalid
+ *      sequence in the specified encoding.
  *
- *      If the buffer contains an invalid sequence of the specified
- *      encoding or memory could not be allocated, returns NULL.
+ *     If strict is false, then an invalid sequence is replaced by
+ *      a substitution character, which is either the Unicode
+ *     substitution character (U+FFFD or \xef\xbf\xbd in UTF-8)
+ *     or subchar1 (ASCII SUB or control-z, value 0x1a).
  *
  * Results:
  *      An allocated Unicode string containing the decoded characters
@@ -82,46 +89,30 @@ static const size_t UNICODE_UTF16_CODE_UNITS_PADDING = 10;
 Unicode
 UnicodeAllocInternal(const void *buffer,      // IN
                      ssize_t lengthInBytes,   // IN
-                     StringEncoding encoding) // IN
+                     StringEncoding encoding, // IN
+                    Bool strict)             // IN
 {
    char *utf8Result = NULL;
 
    ASSERT(buffer != NULL);
+   ASSERT(lengthInBytes >= 0);
+   ASSERT(Unicode_IsEncodingValid(encoding));
 
-   encoding = Unicode_ResolveEncoding(encoding);
+   if (!strict) {
+      CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding),
+                               buffer, lengthInBytes,
+                              "UTF-8", CSGTG_TRANSLIT, &utf8Result, NULL);
+      return utf8Result;
+   }
 
    switch (encoding) {
    case STRING_ENCODING_US_ASCII:
-      /*
-       * Fall through and treat as a special case of UTF-8.
-       * Unicode_AllocWithLength() has already ensured we've gotten
-       * only 7-bit bytes in 'buffer'.
-       */
    case STRING_ENCODING_UTF8:
-      {
-         char *utf16Str;
-         const char *utf8Str = (const char *)buffer;
-
-         if (lengthInBytes == -1) {
-            lengthInBytes = strlen(utf8Str);
-         }
-
-         // Ensure the input is valid UTF-8.
-         if (CodeSet_Utf8ToUtf16le(utf8Str,
-                                   lengthInBytes,
-                                   &utf16Str,
-                                   NULL)) {
-            free(utf16Str);
-            utf8Result = Util_SafeStrndup(utf8Str, lengthInBytes);
-         }
-         break;
+      if (Unicode_IsBufferValid(buffer, lengthInBytes, encoding)) {
+        utf8Result = Util_SafeStrndup(buffer, lengthInBytes);
       }
-   case STRING_ENCODING_UTF16:
+      break;
    case STRING_ENCODING_UTF16_LE:
-      if (lengthInBytes == -1) {
-         lengthInBytes = Unicode_UTF16Strlen((const utf16_t *)buffer) * 2;
-      }
-
       // utf8Result will be left NULL on failure.
       CodeSet_Utf16leToUtf8((const char *)buffer,
                             lengthInBytes,
@@ -129,16 +120,9 @@ UnicodeAllocInternal(const void *buffer,      // IN
                             NULL);
       break;
    default:
-      if (lengthInBytes == -1) {
-         /*
-          * TODO: This doesn't work for UTF-16 BE, UTF-32, and other
-          * encodings with embedded NULs.
-          */
-         lengthInBytes = strlen((const char *)buffer);
-      }
       CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding),
                                buffer, lengthInBytes,
-                              "UTF-8", CSGTG_NORMAL, &utf8Result, NULL);
+                              "UTF-8", 0, &utf8Result, NULL);
       break;
    }
 
@@ -146,6 +130,51 @@ UnicodeAllocInternal(const void *buffer,      // IN
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Unicode_IsBufferValid --
+ *
+ *      Tests if the given buffer is valid in the specified encoding.
+ *
+ *      If lengthInBytes is -1, then buffer must be NUL-terminated.
+ *      Otherwise, buffer must be of the specified length, but does
+ *      not need to be NUL-terminated.
+ *
+ * Results:
+ *      TRUE if the buffer is valid, FALSE if it's not.
+ *
+ * Side effects:
+ *      None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+Unicode_IsBufferValid(const void *buffer,      // IN
+                      ssize_t lengthInBytes,   // IN
+                      StringEncoding encoding) // IN
+{
+   if (buffer == NULL) {
+      ASSERT(lengthInBytes <= 0);
+      return TRUE;
+   }
+
+   encoding = Unicode_ResolveEncoding(encoding);
+
+   if (encoding == STRING_ENCODING_US_ASCII) {
+      return UnicodeSanityCheck(buffer, lengthInBytes, encoding);
+   }
+
+   if (lengthInBytes == -1) {
+      lengthInBytes = Unicode_LengthInBytes(buffer, encoding);
+   }
+
+   return CodeSet_Validate(buffer, lengthInBytes,
+                          Unicode_EncodingEnumToName(encoding));
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -436,15 +465,15 @@ Unicode_BytesRequired(ConstUnicode str,        // IN
       // TODO: Lots more encodings can be added here.
       basicCodePointSize = supplementaryCodePointSize = 1;
       break;
-   case STRING_ENCODING_UTF16:
    case STRING_ENCODING_UTF16_LE:
    case STRING_ENCODING_UTF16_BE:
+   case STRING_ENCODING_UTF16_XE:
       basicCodePointSize = 2;
       supplementaryCodePointSize = 4;
       break;
-   case STRING_ENCODING_UTF32:
    case STRING_ENCODING_UTF32_LE:
    case STRING_ENCODING_UTF32_BE:
+   case STRING_ENCODING_UTF32_XE:
       basicCodePointSize = 4;
       supplementaryCodePointSize = 4;
       break;
@@ -566,7 +595,6 @@ Unicode_CopyBytes(void *destBuffer,        // OUT
          ((char*)destBuffer)[copyBytes] = '\0';
       }
       break;
-   case STRING_ENCODING_UTF16:
    case STRING_ENCODING_UTF16_LE:
       {
          char *utf16Buf;
@@ -718,7 +746,6 @@ UnicodeGetAllocBytesInternal(ConstUnicode ustr,       // IN
       }
       break;
 
-   case STRING_ENCODING_UTF16:
    case STRING_ENCODING_UTF16_LE:
       if (!CodeSet_Utf8ToUtf16le(utf8Str, len, &result, retLength)) {
         // input should be valid UTF-8, no conversion error possible
index 2b346a4f84f4ac144e2392a711ae4c32fd484aa9..f1feee5e5d9e435553c8e1f8f17f217433a32495 100644 (file)
@@ -41,14 +41,15 @@ static char *UnicodeNormalizeEncodingName(const char *encoding);
  *
  * See: http://www.iana.org/assignments/character-sets
  *      http://msdn2.microsoft.com/en-us/library/ms776446(VS.85).aspx
+ *      http://demo.icu-project.org/icu-bin/convexp
  *
  * If you add new StringEncodings to this table, you must keep the
  * StringEncoding enum in lib/public/unicodeTypes.h in sync!
  */
 
-#define MAXCHARSETNAMES 12
-#define MIBUNDEF -1
-#define WINUNDEF -1
+#define MAXCHARSETNAMES 20
+#define MIBUNDEF (-1)
+#define WINUNDEF (-1)
 #define SUPPORTED TRUE
 #define UNSUPPORTED FALSE
 
@@ -66,49 +67,54 @@ static struct xRef {
    { 3, 20127, STRING_ENCODING_US_ASCII, SUPPORTED, 4,
       { "ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991",
         "ASCII", "ISO646-US", "US-ASCII", "us", "IBM367", "cp367", "csASCII",
-         NULL }
+        "646", "ascii7", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 4, 28591, STRING_ENCODING_ISO_8859_1, SUPPORTED, 3,
       { "ISO_8859-1:1987", "iso-ir-100", "ISO_8859-1", "ISO-8859-1", "latin1",
-        "l1", "IBM819", "CP819", "csISOLatin1", NULL }
+        "l1", "IBM819", "CP819", "csISOLatin1", "8859_1", "819", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 5, 28592, STRING_ENCODING_ISO_8859_2, SUPPORTED, 3,
       { "ISO_8859-2:1987", "iso-ir-101", "ISO_8859-2", "ISO-8859-2", "latin2",
-        "l2", "csISOLatin2", NULL }
+        "l2", "csISOLatin2", "ibm-912_P100-1995", "ibm-912", "8859_2", "cp912",
+        "912", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 6, 28593, STRING_ENCODING_ISO_8859_3, SUPPORTED, 3,
       { "ISO_8859-3:1988", "iso-ir-109", "ISO_8859-3", "ISO-8859-3", "latin3",
-        "l3", "csISOLatin3", NULL }
+        "l3", "csISOLatin3", "ibm-913_P100-2000", "ibm-913", "8859_3", "cp913",
+        "913", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 7, 28594, STRING_ENCODING_ISO_8859_4, SUPPORTED, 3,
       { "ISO_8859-4:1988", "iso-ir-110", "ISO_8859-4", "ISO-8859-4", "latin4",
-        "l4", "csISOLatin4", NULL }
+        "l4", "csISOLatin4", "ibm-914_P100-1995", "ibm-914", "8859_4", "cp914",
+        "914", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 8, 28595, STRING_ENCODING_ISO_8859_5, SUPPORTED, 3,
       { "ISO_8859-5:1988", "iso-ir-144", "ISO_8859-5", "ISO-8859-5", "cyrillic",
-        "csISOLatinCyrillic", NULL }
+        "csISOLatinCyrillic", "ibm-915_P100-1995", "ibm-915", "8859_5", "cp915",
+        "915", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 9, 28596, STRING_ENCODING_ISO_8859_6, SUPPORTED, 3,
       { "ISO_8859-6:1987", "iso-ir-127", "ISO_8859-6", "ISO-8859-6", "ECMA-114",
-        "ASMO-708", "arabic", "csISOLatinArabic", NULL }
+        "ASMO-708", "arabic", "csISOLatinArabic", "ibm-1089_P100-1995",
+        "ibm-1089", "8859_6", "cp1089", "1089", NULL }
    },
    /*
     * Source: Windows duplicate of ISO-8859-6
@@ -121,21 +127,23 @@ static struct xRef {
     */
    { 10, 28597, STRING_ENCODING_ISO_8859_7, SUPPORTED, 3,
       { "ISO_8859-7:1987", "iso-ir-126", "ISO_8859-7", "ISO-8859-7", "ELOT_928",
-        "ECMA-118", "greek", "greek8", "csISOLatinGreek", NULL }
+        "ECMA-118", "greek", "greek8", "csISOLatinGreek", "ibm-9005_X110-2007",
+        "ibm-9005", "sun_eu_greek", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 11, 28598, STRING_ENCODING_ISO_8859_8, SUPPORTED, 3,
       { "ISO_8859-8:1988", "iso-ir-138", "ISO_8859-8", "ISO-8859-8", "hebrew",
-        "csISOLatinHebrew", NULL }
+        "csISOLatinHebrew", "ibm-5012_P100-1999", "ibm-5012", "8859_8", NULL }
    },
    /*
     * Source: ECMA registry
     */
    { 12, 28599, STRING_ENCODING_ISO_8859_9, SUPPORTED, 3,
       { "ISO_8859-9:1989", "iso-ir-148", "ISO_8859-9", "ISO-8859-9", "latin5",
-        "l5", "csISOLatin5", NULL }
+        "l5", "csISOLatin5", "ibm-920_P100-1995", "ibm-920", "8859_9", "cp920",
+        "920", "ECMA-128", NULL }
    },
    /*
     * Source: ECMA registry
@@ -174,7 +182,9 @@ static struct xRef {
     *         This charset can be used for the top-level media type "text".
     */
    { 17, 932, STRING_ENCODING_SHIFT_JIS, SUPPORTED, 0,
-      { "Shift_JIS", "MS_Kanji", "csShiftJIS", NULL }
+      { "Shift_JIS", "MS_Kanji", "csShiftJIS", "ibm-943_P15A-2003", "ibm-943",
+        "x-sjis", "x-ms-cp932", "cp932", "cp943c", "IBM-943C", "ms932", "pck",
+        "sjis", "ibm-943_VSUB_VPUA", NULL }
    },
    /*
     * Source: Standardized by OSF, UNIX International, and UNIX Systems
@@ -323,7 +333,8 @@ static struct xRef {
     */
    { 36, 949, STRING_ENCODING_KS_C_5601_1987, SUPPORTED, 0,
       { "KS_C_5601-1987", "iso-ir-149", "KS_C_5601-1989", "KSC_5601", "korean",
-        "csKSC56011987", NULL }
+        "csKSC56011987", "ibm-1363_P11B-1998", "ibm-1363", "cp1363", "5601",
+        "ksc", "ibm-1363_VSUB_VPUA", NULL }
    },
    /*
     * Source: RFC-1557 (see also KS_C_5601-1987)
@@ -756,14 +767,16 @@ static struct xRef {
     * Source: RFC 3629
     */
    { 106, 65001, STRING_ENCODING_UTF8, SUPPORTED, 0,
-      { "UTF-8", NULL }
+      { "UTF-8", "ibm-1208", "ibm-1209", "ibm-5304", "ibm-5305", "ibm-13496",
+        "ibm-13497", "ibm-17592", "ibm-17593", "cp1208", NULL }
    },
    /*
     * Source: ISO See 
     *     (http://www.iana.org/assignments/charset-reg/ISO-8859-13)[Tumasonis] 
     */
    { 109, 28603, STRING_ENCODING_ISO_8859_13, SUPPORTED, 0,
-      { "ISO-8859-13", NULL }
+      { "ISO-8859-13", "ibm-921_P100-1995", "ibm-921", "8859_13", "cp921",
+        "921", NULL }
    },
    /*
     * Source: ISO See
@@ -778,7 +791,9 @@ static struct xRef {
     *     Please see: <http://www.iana.org/assignments/charset-reg/ISO-8859-15>
     */
    { 111, 28605, STRING_ENCODING_ISO_8859_15, SUPPORTED, 0,
-      { "ISO-8859-15", "ISO_8859-15", "Latin-9", NULL }
+      { "ISO-8859-15", "ISO_8859-15", "Latin-9", "ibm-923_P100-1998", "ibm-923",
+        "l9", "8859_15", "latin0", "csisolatin0", "csisolatin9", "cp923", "923",
+        "iso8859_15_fdis", NULL }
    },
    /*
     * Windows duplicate of ISO-8859-15
@@ -799,7 +814,7 @@ static struct xRef {
     *         Please see: <http://www.iana.org/assignments/charset-reg/GBK>
     */
    { 113, 936, STRING_ENCODING_GBK, SUPPORTED, 0,
-      { "GBK", "CP936", "MS936", "windows-936", NULL }
+      { "GBK", "CP936", "MS936", "windows-936", "windows-936-2000", NULL }
    },
    /*
     * Source: Chinese IT Standardization Technical Committee
@@ -852,14 +867,15 @@ static struct xRef {
     *         does not specify (it is a 16-bit integer space)
     */
    { 1000, WINUNDEF, STRING_ENCODING_ISO_10646_UCS_2, SUPPORTED, 0,
-      { "ISO-10646-UCS-2", "csUnicode", NULL }
+      { "ISO-10646-UCS-2", "csUnicode", "ibm-1204", "ibm-1205", "unicode",
+        "ucs-2", NULL }
    },
    /*
     * Source: the full code space. (same comment about byte order,
     *         these are 31-bit numbers.
     */
    { 1001, WINUNDEF, STRING_ENCODING_ISO_10646_UCS_4, SUPPORTED, 0,
-      { "ISO-10646-UCS-4", "csUCS4", NULL }
+      { "ISO-10646-UCS-4", "csUCS4", "ibm-1236", "ibm-1237", "ucs-4", NULL }
    },
    /*
     * Source: ASCII subset of Unicode.  Basic Latin = collection 1
@@ -935,53 +951,56 @@ static struct xRef {
     * Source: RFC 2781
     */
    { 1013, 1201, STRING_ENCODING_UTF16_BE, SUPPORTED, 0,
-      { "UTF-16BE", NULL }
+      { "UTF-16BE", "x-utf-16be", "ibm-1200", "ibm-1201", "ibm-13488",
+        "ibm-13489", "ibm-17584", "ibm-17585", "ibm-21680", "ibm-21681",
+        "ibm-25776", "ibm-25777", "ibm-29872", "ibm-29873", "ibm-61955",
+        "ibm-61956", "cp1200", "cp1201", "UTF16_BigEndian", NULL }
    },
    /*
     * Source: RFC 2781
     */
-   { 1015, 1200, STRING_ENCODING_UTF16, SUPPORTED, 0,
-      { "UTF-16", NULL }
+   { 1014, 1200, STRING_ENCODING_UTF16_LE, SUPPORTED, 0,
+      { "UTF-16LE", "x-utf-16le", "ibm-1202", "ibm-1203", "ibm-13490",
+        "ibm-13491", "ibm-17586", "ibm-17587", "ibm-21682", "ibm-21683",
+        "ibm-25778", "ibm-25779", "ibm-29874", "ibm-29875",
+        "UTF16_LittleEndian", NULL }
    },
    /*
     * Source: RFC 2781
-    *
-    * UTF-16LE is after UTF16 so windows code page 1200 matches UTF16 first
     */
-   { 1014, 1200, STRING_ENCODING_UTF16_LE, SUPPORTED, 0,
-      { "UTF-16LE", NULL }
+   { 1015, WINUNDEF, STRING_ENCODING_UTF16_XE, SUPPORTED, 0,
+      { "UTF-16", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr26>
     */
    { 1016, WINUNDEF, STRING_ENCODING_CESU_8, SUPPORTED, 0,
-      { "CESU-8", "csCESU-8", NULL }
+      { "CESU-8", "csCESU-8", "ibm-9400", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
     */
-   { 1017, 12000, STRING_ENCODING_UTF32, SUPPORTED, 0,
+   { 1017, WINUNDEF, STRING_ENCODING_UTF32_XE, SUPPORTED, 0,
       { "UTF-32", NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
     */
    { 1018, 12001, STRING_ENCODING_UTF32_BE, SUPPORTED, 0,
-      { "UTF-32BE", NULL }
+      { "UTF-32BE", "UTF32_BigEndian", "ibm-1232", "ibm-1233", "ibm-9424",
+         NULL }
    },
    /*
     * Source: <http://www.unicode.org/unicode/reports/tr19/>
-    *
-    * Windows code page 12000 matches UTF-32 above first 
     */
    { 1019, 12000, STRING_ENCODING_UTF32_LE, SUPPORTED, 0,
-      { "UTF-32LE", NULL }
+      { "UTF-32LE", "UTF32_LittleEndian", "ibm-1234", "ibm-1235", NULL }
    },
    /*
     * Source: http://www.unicode.org/notes/tn6/
     */
    { 1020, WINUNDEF, STRING_ENCODING_BOCU_1, SUPPORTED, 0,
-      { "BOCU-1", "csBOCU-1", NULL }
+      { "BOCU-1", "csBOCU-1", "ibm-1214", "ibm-1215", NULL }
    },
    /*
     * Source: Extended ISO 8859-1 Latin-1 for Windows 3.0.  
@@ -1090,7 +1109,7 @@ static struct xRef {
    /*
     * Source: Presentation Set, CPGID: 838
     */
-   { 2016, WINUNDEF, STRING_ENCODING_IBM_THAI, UNSUPPORTED, 0,
+   { 2016, 20838, STRING_ENCODING_IBM_THAI, UNSUPPORTED, 0,
       { "IBM-Thai", "csIBMThai", NULL }
    },
    /*
@@ -1177,7 +1196,7 @@ static struct xRef {
     *         PCL Symbol Set Id: 18T
     */
    { 2026, 950, STRING_ENCODING_BIG_5, SUPPORTED, 0,
-      { "Big5", "csBig5", NULL }
+      { "Big5", "csBig5", "windows-950", "x-big5", NULL }
    },
    /*
     * Source: The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991
@@ -1543,7 +1562,7 @@ static struct xRef {
     * Source: RFC 1842, RFC 1843 [RFC1842, RFC1843]
     */
    { 2085, 52936, STRING_ENCODING_HZ_GB_2312, SUPPORTED, 0,
-      { "HZ-GB-2312", NULL }
+      { "HZ-GB-2312", "HZ", NULL }
    },
    /*
     * Source: IBM NLDG Volume 2 (SE09-8002-03) August 1994
@@ -1702,70 +1721,71 @@ static struct xRef {
     *  (http://www.iana.org/assignments/charset-reg/windows-1250) [Lazhintseva]
     */
    { 2250, 1250, STRING_ENCODING_WINDOWS_1250, SUPPORTED, 0,
-      { "windows-1250", NULL }
+      { "windows-1250", "ibm-5346_P100-1998", "ibm-5346", "cp1250", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1251) [Lazhintseva]
     */
    { 2251, 1251, STRING_ENCODING_WINDOWS_1251, SUPPORTED, 0,
-      { "windows-1251", NULL }
+      { "windows-1251", "ibm-5347_P100-1998", "ibm-5347", "cp1251", "ANSI1251",
+         NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1252) [Wendt]
     */
    { 2252, 1252, STRING_ENCODING_WINDOWS_1252, SUPPORTED, 0,
-      { "windows-1252", NULL }
+      { "windows-1252", "ibm-5348_P100-1997", "ibm-5348", "cp1252", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1253) [Lazhintseva]
     */
    { 2253, 1253, STRING_ENCODING_WINDOWS_1253, SUPPORTED, 0,
-      { "windows-1253", NULL }
+      { "windows-1253", "ibm-5349_P100-1998", "ibm-5349", "cp1253", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1254) [Lazhintseva]
     */
    { 2254, 1254, STRING_ENCODING_WINDOWS_1254, SUPPORTED, 0,
-      { "windows-1254", NULL }
+      { "windows-1254", "ibm-5350_P100-1998", "ibm-5350", "cp1254", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1255) [Lazhintseva]
     */
    { 2255, 1255, STRING_ENCODING_WINDOWS_1255, SUPPORTED, 0,
-      { "windows-1255", NULL }
+      { "windows-1255", "ibm-9447_P100-2002", "ibm-9447", "cp1255", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1256) [Lazhintseva]
     */
    { 2256, 1256, STRING_ENCODING_WINDOWS_1256, SUPPORTED, 0,
-      { "windows-1256", NULL }
+      { "windows-1256", "ibm-9448_X100-2005", "ibm-9448", "cp1256", NULL }
    },
    /*
     * Source: Microsoft 
     *  (http://www.iana.org/assignments/charset-reg/windows-1257) [Lazhintseva]
     */
    { 2257, 1257, STRING_ENCODING_WINDOWS_1257, SUPPORTED, 0,
-      { "windows-1257", NULL }
+      { "windows-1257", "ibm-9449_P100-2002", "ibm-9449", "cp1257", NULL }
    },
    /*
     * Source: Microsoft
     *  (http://www.iana.org/assignments/charset-reg/windows-1258) [Lazhintseva]
     */
    { 2258, 1258, STRING_ENCODING_WINDOWS_1258, SUPPORTED, 0,
-      { "windows-1258", NULL }
+      { "windows-1258", "ibm-5354_P100-1998", "ibm-5354", "cp1258", NULL }
    },
    /*
     * Source: Thai Industrial Standards Institute (TISI)
     *    [Tantsetthi]
     */
    { 2259, WINUNDEF, STRING_ENCODING_TIS_620, SUPPORTED, 0,
-      { "TIS-620", NULL }
+      { "TIS-620", "windows-874-2000", "MS874", NULL }
    },
    /*
     * Windows specific entries for which there is no corresponding IANA mapping
@@ -1795,12 +1815,6 @@ static struct xRef {
    { MIBUNDEF, 737, STRING_ENCODING_WINDOWS_737, UNSUPPORTED, 0,
       { "Windows-737", "IBM737", NULL }
    },
-   /*
-    * ibm775: OEM Baltic; Baltic (DOS)
-    */
-   { MIBUNDEF, 775, STRING_ENCODING_WINDOWS_775, UNSUPPORTED, 0,
-      { "Windows-775", "IBM775", NULL }
-   },
    /*
     * cp875: IBM EBCDIC Greek Modern
     */
@@ -1986,12 +2000,6 @@ static struct xRef {
    { MIBUNDEF, 20833, STRING_ENCODING_WINDOWS_20833, UNSUPPORTED, 0,
       { "Windows-20833", "x-EBCDIC-KoreanExtended", NULL }
    },
-   /*
-    * IBM-Thai: IBM EBCDIC Thai
-    */
-   { MIBUNDEF, 20838, STRING_ENCODING_WINDOWS_20838, UNSUPPORTED, 0,
-      { "Windows-20838", "IBM-Thai", NULL }
-   },
    /*
     * x-cp20949: Korean Wansung
     */
@@ -2100,25 +2108,25 @@ static struct xRef {
     * x-iscii-de: ISCII Devanagari
     */
    { MIBUNDEF, 57002, STRING_ENCODING_WINDOWS_57002, SUPPORTED, 0,
-      { "Windows-57002", "x-iscii-de", NULL }
+      { "Windows-57002", "x-iscii-de", "iscii-dev", "ibm-4902", NULL }
    },
    /*
     * x-iscii-be: ISCII Bengali
     */
    { MIBUNDEF, 57003, STRING_ENCODING_WINDOWS_57003, SUPPORTED, 0,
-      { "Windows-57003", "x-iscii-be", NULL }
+      { "Windows-57003", "x-iscii-be", "iscii-bng", NULL }
    },
    /*
     * x-iscii-ta: ISCII Tamil
     */
    { MIBUNDEF, 57004, STRING_ENCODING_WINDOWS_57004, SUPPORTED, 0,
-      { "Windows-57004", "x-iscii-ta", NULL }
+      { "Windows-57004", "x-iscii-ta", "iscii-tml", NULL }
    },
    /*
     * x-iscii-te: ISCII Telugu
     */
    { MIBUNDEF, 57005, STRING_ENCODING_WINDOWS_57005, SUPPORTED, 0,
-      { "Windows-57005", "x-iscii-te", NULL }
+      { "Windows-57005", "x-iscii-te", "iscii-tlg", NULL }
    },
    /*
     * x-iscii-as: ISCII Assamese
@@ -2130,31 +2138,31 @@ static struct xRef {
     * x-iscii-or: ISCII Oriya
     */
    { MIBUNDEF, 57007, STRING_ENCODING_WINDOWS_57007, SUPPORTED, 0,
-      { "Windows-57007", "x-iscii-or", NULL }
+      { "Windows-57007", "x-iscii-or", "iscii-ori", NULL }
    },
    /*
     * x-iscii-ka: ISCII Kannada
     */
    { MIBUNDEF, 57008, STRING_ENCODING_WINDOWS_57008, SUPPORTED, 0,
-      { "Windows-57008", "x-iscii-ka", NULL }
+      { "Windows-57008", "x-iscii-ka", "iscii-knd", NULL }
    },
    /*
     * x-iscii-ma: ISCII Malayalam
     */
    { MIBUNDEF, 57009, STRING_ENCODING_WINDOWS_57009, SUPPORTED, 0,
-      { "Windows-57009", "x-iscii-ma", NULL }
+      { "Windows-57009", "x-iscii-ma", "iscii-mlm", NULL }
    },
    /*
     * x-iscii-gu: ISCII Gujarati
     */
    { MIBUNDEF, 57010, STRING_ENCODING_WINDOWS_57010, SUPPORTED, 0,
-      { "Windows-57010", "x-iscii-gu", NULL }
+      { "Windows-57010", "x-iscii-gu", "x-iscii-guj", NULL }
    },
    /*
     * x-iscii-pa: ISCII Punjabi
     */
    { MIBUNDEF, 57011, STRING_ENCODING_WINDOWS_57011, SUPPORTED, 0,
-      { "Windows-57011", "x-iscii-pa", NULL }
+      { "Windows-57011", "x-iscii-pa", "iscii-gur", NULL }
    },
 };
 
index 5d553eb520acde1b6bf8c64463511b27d695981a..6563a10d90b7e7416fb3004eacc7b99f1edabb1e 100644 (file)
@@ -20,4 +20,5 @@ noinst_LIBRARIES = libunityStub.a
 libunityStub_a_SOURCES =
 libunityStub_a_SOURCES += unityStub.c
 
-AM_CFLAGS = @LIB_FILE_CPPFLAGS@
+AM_CFLAGS = @GTK_CPPFLAGS@
+AM_CFLAGS += @LIB_FILE_CPPFLAGS@
index 2499f4a6e39044205f9be96acb81abf8e22f4ac9..59cd5c1af6116e1bca9b7fa5c86eed3aa48eca03 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -221,7 +222,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libunityStub.a
 libunityStub_a_SOURCES = unityStub.c
-AM_CFLAGS = @LIB_FILE_CPPFLAGS@
+AM_CFLAGS = @GTK_CPPFLAGS@ @LIB_FILE_CPPFLAGS@
 all: all-am
 
 .SUFFIXES:
index b31e74f0a3626d32c2ec70c6680225e47f0801a8..1601bd094e8c0d031fc485e585ee81916b721d7d 100644 (file)
@@ -60,7 +60,7 @@ Unity_IsSupported(void)
 }
 
 void
-Unity_SetActiveDnDDetWnd(int detWnd)
+Unity_SetActiveDnDDetWnd(UnityDnD *state)
 {
 }
 
index df884a3bfcf5f3fc9e507b2b4ba54782af575be0..ceda435ebd7755b1a01d57d643b2d52d40b38304 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 88673805586d55f975fe0e8371c9a6d14c65e0ca..f7cfb286ed7ce22aae8eaa093158156724f3d200 100644 (file)
@@ -157,6 +157,7 @@ Hostinfo_GetCpuid(HostinfoCpuIdInfo *info) // OUT
    *(uint32*)(cpuid.id0.name + 12) = 0;
 
    __GET_CPUID(1,          (CPUIDRegs*)&cpuid.id1);
+   __GET_CPUID(0xa,        (CPUIDRegs*)&cpuid.ida);
    __GET_CPUID(0x80000000, (CPUIDRegs*)&cpuid.id80);
    __GET_CPUID(0x80000001, (CPUIDRegs*)&cpuid.id81);
    __GET_CPUID(0x80000008, (CPUIDRegs*)&cpuid.id88);
index ed3d3e6123f41f1b28576b5c47323e12c68ca7a1..89a06b4b1f7c76a64bfedb7279236f25c0cb879f 100644 (file)
 #endif
 #endif
 #endif
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
 
 #include "vmware.h"
 #include "hostType.h"
@@ -89,6 +93,7 @@
 #ifdef VMX86_SERVER
 #include "uwvmkAPI.h"
 #include "uwvmk.h"
+#include "vmkSyscall.h"
 #endif
 
 #define LGPFX "HOSTINFO:"
 
 #if !defined(__APPLE__)
 static char *HostinfoGetCpuInfo(int nCpu, char *name);
+#if !defined(VMX86_SERVER)
 static Bool HostinfoGetMemInfo(char *name, unsigned int *value);
-static Bool HostinfoGetMemSize(uint64 *total, uint64 *avail);
-#endif
+#endif // ifndef VMX86_SERVER
+#endif // ifndef __APPLE__
 
 
 /*
@@ -673,6 +679,15 @@ Hostinfo_NumCPUs(void)
       return -1;
    }
 
+   return out;
+#elif defined(__FreeBSD__)
+   uint32 out;
+   size_t outSize = sizeof out;
+
+   if (sysctlbyname("kern.smp.cpus", &out, &outSize, NULL, 0) == -1) {
+      return -1;
+   }
+
    return out;
 #else
    static int count = 0;
@@ -900,6 +915,7 @@ HostinfoGetCpuInfo(int nCpu,         // IN
 }
 
 
+#if !defined(VMX86_SERVER)
 /*
  *----------------------------------------------------------------------
  *
@@ -948,59 +964,6 @@ HostinfoFindEntry(char *buffer,         // IN: Buffer
 }
 
 
-/*
- *----------------------------------------------------------------------
- *
- * HostinfoGetMemSize --
- *
- *      Get the memory size and available space from  /proc/vmware/mem 
- *      on ESX hosts. Return value is in MB.
- *
- * Results:
- *      TRUE on success, FALSE on failure
- *
- * Side effects:
- *      None.
- *
- *----------------------------------------------------------------------
- */
-
-static Bool
-HostinfoGetMemSize(uint64 *memTotal,        // OUT
-                   uint64 *memAvail)        // OUT 
-{
-   const char *memInfoFile = "/proc/vmware/mem";
-   uint64 total = 0;
-   uint64 avail = 0;
-   char buf[MAX_LINE_LEN];
-   FILE *fp = NULL;
-   Bool foundVal = FALSE;
-
-   if ((fp = Posix_Fopen(memInfoFile, "r")) == NULL) {
-      Warning(LGPFX" Could not open meminfo file %s\n", memInfoFile);
-      return FALSE;
-   }
-   
-   while (fgets(buf, MAX_LINE_LEN, fp)) {
-      if (sscanf(buf, "Machine memory free: %"FMT64"d Mbytes/%"FMT64"d Mbytes", 
-                &avail, &total) == 2) {
-         foundVal = TRUE;
-         break;
-      }
-   }
-   if (fp) {
-      fclose(fp);
-   }
-   if (memTotal != NULL) {
-      *memTotal = total;
-   }
-   if (memAvail != NULL) {
-      *memAvail = avail;
-   }
-   return foundVal;
-}
-
-
 /*
  *----------------------------------------------------------------------
  *
@@ -1115,6 +1078,7 @@ HostinfoSysinfo(uint64 *totalRam, // OUT: Total RAM in bytes
    NOT_IMPLEMENTED();
 #endif // ifdef HAVE_SYSINFO
 }
+#endif // ifndef VMX86_SERVER
 #endif // ifndef __APPLE__
 
 
@@ -1174,23 +1138,27 @@ Hostinfo_GetMemoryInfoInPages(unsigned int *minSize,     // OUT
               + stat.wire_count + stat.active_count + stat.inactive_count;
 
    return TRUE;
-#else 
+#elif defined(VMX86_SERVER)
    uint64 total; 
    uint64 free;
-   unsigned int cached = 0;
-   
-   if (vmx86_server) {
-      // This is completely bogus on esx. Needs to use sysinfo.
-      *minSize = 128;
-      if (HostinfoGetMemSize(&total, &free)) {
-         *maxSize = (total *1024 * 1024) / PAGE_SIZE;
-         *currentSize = (free *1024 * 1024) / PAGE_SIZE;
-      } else {
-         *maxSize = (128 *1024 * 1024) / PAGE_SIZE;
-         *currentSize = (32 *1024 * 1024) / PAGE_SIZE;
+   VMK_ReturnStatus status;
+
+   if (VmkSyscall_Init(FALSE, NULL, 0)) {
+      status = CosVmnix_GetMemSize(&total, &free);
+      if (status == VMK_OK) {
+         *minSize = 128;
+         *maxSize = total / PAGE_SIZE;
+         *currentSize = free / PAGE_SIZE;
+
+         return TRUE;
       }
-      return TRUE;
    }
+
+   return FALSE;
+#else 
+   uint64 total; 
+   uint64 free;
+   unsigned int cached = 0;
    
    /*
     * Note that the free memory provided by linux does not include buffer and
@@ -1232,7 +1200,7 @@ Hostinfo_GetMemoryInfoInPages(unsigned int *minSize,     // OUT
    }
 
    return TRUE;
-#endif    // ifdef __APPLE_
+#endif
 }
 
 
index 20d0a5c7a1c5af54578d026bec025e697a3876ab..de7473669d4aec758879dfa14fe0d89808686d30 100644 (file)
 
 #undef WIN32_LEAN_AND_MEAN
 
+#if defined(__linux__) && !defined(VMX86_TOOLS)
+#define _GNU_SOURCE
+#endif
+
 #if defined(_WIN32)
 # include <winsock2.h> // also includes windows.h
 # include <io.h>
 #if !defined(_WIN32) && !defined(N_PLAT_NLM)
 #  include <unistd.h>
 #  include <pwd.h>
+#  include <dlfcn.h>
+#endif
+
+#if defined(__linux__) && !defined(VMX86_TOOLS)
+#  include <link.h>
 #endif
 
 #include "vmware.h"
@@ -363,6 +372,61 @@ UtilBacktraceFromPointerCallback(struct _Unwind_Context *ctx, // IN: Unwind cont
    }
    return _URC_NO_REASON;
 }
+
+#if !defined(_WIN32) && !defined(N_PLAT_NLM) && !defined(VMX86_TOOLS)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UtilSymbolBacktraceFromPointerCallback --
+ *
+ *      Callback from _Unwind_Backtrace to print one backtrace entry
+ *      to the backtrace output.  This version includes symbol information,
+ *      if available.
+ *
+ * Results:
+ *      _URC_NO_REASON : Please continue with backtrace.
+ *
+ * Side effects:
+ *      None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static _Unwind_Reason_Code
+UtilSymbolBacktraceFromPointerCallback(struct _Unwind_Context *ctx, // IN: Unwind context
+                                       void *cbData)                // IN/OUT: Our status
+{
+   struct UtilBacktraceFromPointerData *data = cbData;
+   uintptr_t cfa = _Unwind_GetCFA(ctx);
+   void *encl_func_addr;
+   Dl_info dli;
+   
+
+   /*
+    * Stack grows down.  So if we are below basePtr, do nothing...
+    */
+   if (cfa >= data->basePtr) {
+#ifndef VM_X86_64
+#   error You should not build this on 32bit - there is no eh_frame there.
+#endif
+      encl_func_addr = _Unwind_FindEnclosingFunction((void *)_Unwind_GetIP(ctx));
+      if ( (dladdr(encl_func_addr, &dli)  != 0) ||
+           (dladdr((void *)_Unwind_GetIP(ctx), &dli) != 0 )) {
+         data->outFunc(data->outFuncData,
+                      "Backtrace[%u] %016lx rip=%016lx in function %s "
+                      "in object %s loaded at %016lx\n",
+                      data->frameNr, cfa, _Unwind_GetIP(ctx),
+                      dli.dli_sname, dli.dli_fname, dli.dli_fbase);
+      } else {
+         data->outFunc(data->outFuncData,
+                      "Backtrace/no symbols[%u] %016lx rip=%016lx \n",
+                      data->frameNr, cfa, _Unwind_GetIP(ctx));
+      }
+      data->frameNr++;
+   }
+   return _URC_NO_REASON;
+}
+#endif
 #endif
 
 
@@ -421,9 +485,26 @@ Util_BacktraceFromPointerWithFunc(uintptr_t *basePtr,
    data.outFuncData = outFuncData;
    data.frameNr = 0;
    _Unwind_Backtrace(UtilBacktraceFromPointerCallback, &data);
+
+#if !defined(_WIN32) && !defined(N_PLAT_NLM) && !defined(VMX86_TOOLS)
+   /* 
+    * We do a separate pass here that includes symbols in order to
+    * make sure the base backtrace that does not call dladdr etc.
+    * is safely produced
+    */
+   data.basePtr = (uintptr_t)basePtr;
+   data.outFunc = outFunc;
+   data.outFuncData = outFuncData;
+   data.frameNr = 0;
+   _Unwind_Backtrace(UtilSymbolBacktraceFromPointerCallback, &data);
+#endif
+
 #elif !defined(VM_X86_64)
    uintptr_t *x = basePtr;
    int i;
+#if !defined(_WIN32) && !defined(N_PLAT_NLM) && !defined(VMX86_TOOLS)
+   Dl_info dli;
+#endif
 
    for (i = 0; i < 256; i++) {
       if (x < basePtr ||
@@ -433,6 +514,30 @@ Util_BacktraceFromPointerWithFunc(uintptr_t *basePtr,
       outFunc(outFuncData, "Backtrace[%d] %#08x eip %#08x \n", i, x[0], x[1]);
       x = (uintptr_t *) x[0];
    }
+
+#if !defined(_WIN32) && !defined(N_PLAT_NLM) && !defined(VMX86_TOOLS)
+   /* 
+    * We do a separate pass here that includes symbols in order to
+    * make sure the base backtrace that does not call dladdr etc.
+    * is safely produced
+    */
+   x = basePtr;
+   for (i = 0; i < 256; i++) {
+      if (x < basePtr ||
+         (uintptr_t) x - (uintptr_t) basePtr > 0x8000) {
+         break;
+      }
+      if ( dladdr((uintptr_t *)x[1], &dli)  != 0 ) {
+         outFunc(outFuncData, "Backtrace[%d] %#08x eip %#08x in function %s "
+                              "in object %s loaded at %#08x\n",
+                               i, x[0], x[1], dli.dli_sname, dli.dli_fname,
+                                dli.dli_fbase);
+      } else {
+         outFunc(outFuncData, "Backtrace/no symbol info[%d] %#08x eip %#08x \n", i, x[0], x[1]);
+      }
+      x = (uintptr_t *) x[0];
+   }
+#endif
 #endif
 }
 
@@ -1611,6 +1716,71 @@ Util_SeparateStrings(char *source,              // IN
 
 #endif /* !defined(N_PLAT_NLM) */
 
+#if defined (__linux__) && !defined(VMX86_TOOLS)
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UtilPrintLoadedObjectsCallback --
+ *
+ *       Callback from dl_iterate_phdr to add info for a single  
+ *       loaded object to the log.
+ *
+ * Results:
+ *       0: continue iterating/success 
+ *       non-zero: stop iterating/error
+ *
+ * Side effects:
+ *       None. 
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static int
+UtilPrintLoadedObjectsCallback(struct dl_phdr_info *info,  //IN
+                                size_t size,               //IN
+                                void *data)                //IN
+{
+   /* Blank name means things like stack, which we don't care about */
+   if (strcmp(info->dlpi_name, "")) {
+      Log("Object %s loaded at %p\n", info->dlpi_name, 
+          (void *)info->dlpi_addr); 
+   }
+   return 0;
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Util_PrintLoadedObjects --
+ *
+ *      Print the list of loaded objects to the log.  Useful in
+ *      parsing backtraces with ASLR.
+ *
+ * Results:
+ *
+ *      void
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void 
+Util_PrintLoadedObjects(void *addr_inside_exec) 
+{
+   Dl_info dli;
+
+   Log("Printing loaded objects\n"); 
+   if (dladdr(addr_inside_exec, &dli)) {
+      Log("Object %s loaded at %p\n", dli.dli_fname,
+          (void *)dli.dli_fbase);
+   }
+   dl_iterate_phdr(UtilPrintLoadedObjectsCallback, NULL);
+   Log("End printing loaded objects\n");
+}
+#endif
 
 #if !defined(_WIN32) && !defined(N_PLAT_NLM)
 
index 5daa48b6d418a2fce20700d42b04d1684ef926e0..122434cb0fdd1b4a0359c43a4e6c6f5b38fed74a 100644 (file)
@@ -19,3 +19,5 @@ noinst_LIBRARIES = libVixTools.a
 
 libVixTools_a_SOURCES =
 libVixTools_a_SOURCES += vixTools.c
+AM_CFLAGS = -I$(top_builddir)/include
+
index 73d6f6f10cb89b1ac9ace77698c048732111fff0..daec3041a1a166c3cea8f694341c0084358cc4f4 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -221,6 +222,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LIBRARIES = libVixTools.a
 libVixTools_a_SOURCES = vixTools.c
+AM_CFLAGS = -I$(top_builddir)/include
 all: all-am
 
 .SUFFIXES:
index 63b736013224c1752b1e63b70e5abdaad8f7c085..8a44e5d771afedb7cbbd43b47706d2b316a996cb 100644 (file)
@@ -33,6 +33,7 @@
 #include <WTypes.h>
 #include <io.h>
 #include "wminic.h"
+#include "win32u.h"
 #else
 #include <unistd.h>
 #endif
@@ -60,7 +61,7 @@
 #include "conf.h"
 #include "vixCommands.h"
 #include "base64.h"
-#include "guestInfoInt.h"
+#include "guestInfo.h"
 #include "hgfsServer.h"
 #include "hgfs.h"
 #include "system.h"
@@ -211,10 +212,7 @@ static VixError VixToolsImpersonateUserImplEx(char const *credentialTypeStr,
                                               void **userToken);
 
 #if defined(_WIN32) || defined(linux)
-static char *ToolsDaemonGetCurrentUser(void);
-
-static VixError VixToolsAuthenticateUser(const char *username,
-                                         const char *password);
+static VixError VixToolsDoesUsernameMatchCurrentUser(const char *username);
 #endif
 
 static Bool VixToolsPidRefersToThisProcess(ProcMgr_Pid pid);
@@ -724,7 +722,7 @@ VixTools_GetToolsPropertiesImpl(GuestApp_Dict **confDictRef,      // IN
    /*
     * Collect some values about the host.
     */
-   foundHostName = GuestInfoGetFqdn(sizeof(guestName), guestName);
+   foundHostName = GuestInfo_GetFqdn(sizeof(guestName), guestName);
    if (!foundHostName) {
 #ifdef _WIN32
       DWORD guestNameSize;
@@ -748,7 +746,7 @@ VixTools_GetToolsPropertiesImpl(GuestApp_Dict **confDictRef,      // IN
 #else
    osFamily = GUEST_OS_FAMILY_LINUX;
 #endif
-   if (!(GuestInfoGetOSName(sizeof osNameFull, sizeof osName, osNameFull, osName))) {
+   if (!(GuestInfo_GetOSName(sizeof osNameFull, sizeof osName, osNameFull, osName))) {
       osNameFull[0] = 0;
       osName[0] = 0;
    }
@@ -2062,6 +2060,8 @@ VixToolsListDirectory(VixCommandRequestHeader *requestMsg,    // IN
     * max number of entries we can store.
     */
    resultBufferSize = 3; // truncation bool + space + '\0'
+   lastGoodResultBufferSize = resultBufferSize;
+   ASSERT_NOT_IMPLEMENTED(lastGoodResultBufferSize < maxBufferSize);
    formatStringLength = strlen(fileInfoFormatString);
 
    for (fileNum = offset; fileNum < numFiles; fileNum++) {
@@ -2612,6 +2612,7 @@ VixToolsImpersonateUser(VixCommandRequestHeader *requestMsg,   // IN
    VixError err = VIX_OK;
    char *credentialField;
    VixCommandNamePassword *namePasswordStruct;
+   int credentialType;
 
    credentialField = ((char *) requestMsg)
                            + requestMsg->commonHeader.headerLength 
@@ -2619,12 +2620,15 @@ VixToolsImpersonateUser(VixCommandRequestHeader *requestMsg,   // IN
 
    namePasswordStruct = (VixCommandNamePassword *) credentialField;
    credentialField += sizeof(VixCommandNamePassword);
+   credentialType = requestMsg->userCredentialType;
 
    err = VixToolsImpersonateUserImplEx(NULL, 
-                                       requestMsg->userCredentialType,
+                                       credentialType,
                                        credentialField, 
                                        userToken);
-   if (VIX_OK != err) {
+   if ((VIX_OK != err)
+         && ((VIX_USER_CREDENTIAL_NAME_PASSWORD_OBFUSCATED == credentialType)
+               || (VIX_USER_CREDENTIAL_NAME_PASSWORD == credentialType))) {
       /*
        * Windows does not allow you to login with an empty password. Only
        * the console allows this login, which means the console does not
@@ -2764,50 +2768,27 @@ VixToolsImpersonateUserImplEx(char const *credentialTypeStr,         // IN
        * If the VMX asks us to run commands in the context of the current
        * user, make sure that the user who requested the command is the
        * same as the current user.
-       * Also, make sure that the password is valid. But we need not
-       * impersonate, since we are already running as that user.
+       * We don't need to make sure the password is valid (in fact we should
+       * not receive one) because the VMX should have validated the
+       * password by other means. Currently it sends it to the Tools daemon.
        */
       if (VIX_USER_CREDENTIAL_NAMED_INTERACTIVE_USER == credentialType) {
          if (!thisProcessRunsAsRoot) {
-            Unicode currentUser;
-            int cmpResult;
-
-            success = VixMsg_DeObfuscateNamePassword(obfuscatedNamePassword, 
+            success = VixMsg_DeObfuscateNamePassword(obfuscatedNamePassword,
                                                      &unobfuscatedUserName,
                                                      &unobfuscatedPassword);
-            if (!success) {
+            if (!success || (NULL == unobfuscatedUserName)) {
                err = VIX_E_FAIL;
                goto abort;
             }
 
-            err = VixToolsAuthenticateUser(unobfuscatedUserName,
-                                           unobfuscatedPassword);
-            if (VIX_OK != err) {
-               goto abort;
-            }
-
             /*
              * Make sure that the user who requested the command is the
              * current user.
              */
-            currentUser = ToolsDaemonGetCurrentUser();
-            if (NULL == currentUser) {
-               err = VIX_E_FAIL;
-               goto abort;
-            }
-
-            /*
-             * Windows is case-insensitive about usernames, Linux is not.
-             */
-#ifdef _WIN32
-            cmpResult = Str_Strcasecmp(unobfuscatedUserName, UTF8(currentUser));
-#else
-            cmpResult = strcmp(unobfuscatedUserName, UTF8(currentUser));
-#endif
-            Unicode_Free(currentUser);
 
-            if (0 != cmpResult) {
-               err = VIX_E_INTERACTIVE_SESSION_USER_MISMATCH;
+            err = VixToolsDoesUsernameMatchCurrentUser(unobfuscatedUserName);
+            if (VIX_OK != err) {
                goto abort;
             }
 
@@ -2815,7 +2796,6 @@ VixToolsImpersonateUserImplEx(char const *credentialTypeStr,         // IN
                *userToken = PROCESS_CREATOR_USER_TOKEN;
             }
 
-            err = VIX_OK;
             goto abort;
          } else {
             /*
@@ -3178,8 +3158,8 @@ VixToolsGetGuestNetworkingConfig(VixCommandRequestHeader *requestMsg,   // IN
    VixPropertyListImpl propList;
    char *serializedBuffer = NULL;
    size_t serializedBufferLength = 0;
-   NicEntry *nicEntry = NULL;
-   VmIpAddressEntry *ipAddr;
+   GuestNic *nicEntry = NULL;
+   VmIpAddress *ipAddr;
 
    ASSERT(NULL != requestMsg);
    ASSERT(NULL != resultBuffer);
@@ -3187,21 +3167,20 @@ VixToolsGetGuestNetworkingConfig(VixCommandRequestHeader *requestMsg,   // IN
 
    VixPropertyList_Initialize(&propList);
 
-   nicEntry = NetUtil_GetPrimaryNicEntry();
+   nicEntry = NetUtil_GetPrimaryNic();
    if (NULL == nicEntry) {
       err = FoundryToolsDaemon_TranslateSystemErr();
       goto abort;
    }
 
-   ipAddr = DblLnkLst_Container(nicEntry->ipAddressList.next, 
-                                VmIpAddressEntry, 
-                                links);
+   ipAddr = &nicEntry->ips.ips_val[0];
+
    /*
     *  Now, record these values in a property list.
     */
    err = VixPropertyList_SetString(&propList,
                                    VIX_PROPERTY_VM_IP_ADDRESS,
-                                   ipAddr->ipEntryProto.ipAddress);
+                                   ipAddr->ipAddress);
    if (VIX_OK != err) {
       goto abort;
    }
@@ -3209,14 +3188,14 @@ VixToolsGetGuestNetworkingConfig(VixCommandRequestHeader *requestMsg,   // IN
 #if defined(_WIN32)
    err = VixPropertyList_SetBool(&propList,
                                  VIX_PROPERTY_VM_DHCP_ENABLED,
-                                 ipAddr->ipEntryProto.dhcpEnabled);
+                                 ipAddr->dhcpEnabled);
    if (VIX_OK != err) {
       goto abort;
    }
 
    err = VixPropertyList_SetString(&propList,
                                    VIX_PROPERTY_VM_SUBNET_MASK,
-                                   ipAddr->ipEntryProto.subnetMask);
+                                   ipAddr->subnetMask);
    if (VIX_OK != err) {
       goto abort;
    }
@@ -3241,7 +3220,7 @@ VixToolsGetGuestNetworkingConfig(VixCommandRequestHeader *requestMsg,   // IN
 
 abort:
    VixPropertyList_RemoveAllWithoutHandles(&propList);
-   GuestInfo_FreeDynamicMemoryInNic(nicEntry);
+   VMX_XDR_FREE(xdr_GuestNic, nicEntry);
    free(nicEntry);
 
    return err;
@@ -3388,13 +3367,12 @@ abort:
 /*
  *-----------------------------------------------------------------------------
  *
- * ToolsDaemonGetCurrentUser --
+ * VixToolsDoesUsernameMatchCurrentUser --
  *
- *    Get the name of the user whom the process is running as.
+ *    Check if the provider username matches the current user.
  *
  * Return value:
- *    A unicode string containing the name of the current user, or NULL on
- *    failure.
+ *    VIX_OK if it does, otherwise an appropriate error code.
  *
  * Side effects:
  *    None
@@ -3402,122 +3380,95 @@ abort:
  *-----------------------------------------------------------------------------
  */
 
-static Unicode
-ToolsDaemonGetCurrentUser(void)
+static VixError
+VixToolsDoesUsernameMatchCurrentUser(const char *username)  // IN
 {
-   Unicode currentUser = NULL;
+   VixError err = VIX_E_FAIL;
 
 #ifdef _WIN32
-   wchar_t *buffer = NULL;
-   DWORD bufferSize = 0;
+   char *currentUser = NULL;
+   DWORD currentUserSize = 0;
    
    /*
-    * Call the function with a NULL buffer, fail for lack of space,
-    * use the returned size to allocate a buffer and call again.
-    * This uses GetUserNameA() to keep things simple and ASCII for now.
+    * For Windows, get the name of the owner of this process, then
+    * compare it to the provided username.
     */
-   if (!GetUserNameW(buffer, &bufferSize)) {
+   if (!Win32U_GetUserName(currentUser, &currentUserSize)) {
       if (ERROR_INSUFFICIENT_BUFFER != GetLastError()) {
+         err = FoundryToolsDaemon_TranslateSystemErr();
          goto abort;
       }
-      
-      buffer = Util_SafeMalloc(bufferSize * sizeof *buffer);
-      
-      if (!GetUserNameW(buffer, &bufferSize)) {
+
+      currentUser = Util_SafeMalloc(currentUserSize);
+
+      if (!Win32U_GetUserName(currentUser, &currentUserSize)) {
+         err = FoundryToolsDaemon_TranslateSystemErr();
          goto abort;
       }
    }
-   
-   currentUser = Unicode_AllocWithUTF16(buffer);
+
+   if (0 != Unicode_CompareIgnoreCase(username, currentUser)) {
+      err = VIX_E_INTERACTIVE_SESSION_USER_MISMATCH;
+      goto abort;
+   }
+
+   err = VIX_OK;
+
+abort:
+   free(currentUser);
 
 #else /* Below is the POSIX case. */
    uid_t currentUid;
    struct passwd pwd;
    struct passwd *ppwd = &pwd;
-   char *buffer = NULL;   // a pool of memory for getpwuid_r() to use.
+   char *buffer = NULL; // a pool of memory for Posix_Getpwnam_r() to use.
    size_t bufferSize;
    
    /*
-    * Get the maximum size buffer needed by getpwuid_r.
+    * For POSIX systems, look up the uid of 'username', and compare
+    * it to the uid of the owner of this process. This handles systems
+    * where multiple usernames map to the name user.
     */
-   bufferSize = (size_t) sysconf(_SC_GETPW_R_SIZE_MAX);
    
-   buffer = Util_SafeMalloc(bufferSize);
-      
    /*
-    * In the Windows version, GetUserNameW() returns the name of the
-    * user the thread is impersonating (if it is impersonating someone),
-    * so geteuid() seems to be the moral equivalent.
+    * Get the maximum size buffer needed by getpwuid_r.
+    * Multiply by 4 to compensate for the conversion to UTF-8 by
+    * the Posix_Getpwnam_r() wrapper.
     */
-   currentUid = geteuid();
-   
-   if (getpwuid_r(currentUid, &pwd, buffer, bufferSize, &ppwd) != 0 ||
+   bufferSize = (size_t) sysconf(_SC_GETPW_R_SIZE_MAX) * 4;
+
+   buffer = Util_SafeMalloc(bufferSize);
+
+   if (Posix_Getpwnam_r(username, &pwd, buffer, bufferSize, &ppwd) != 0 ||
        NULL == ppwd) {
-      Warning("Unable to get the username for uid %d.\n", currentUid);
+      /* 
+       * This username should exist, since it should have already
+       * been validated by guestd. Assume it is a system error.
+       */
+      err = FoundryToolsDaemon_TranslateSystemErr();
+      Warning("Unable to get the uid for username %s.\n", username);
       goto abort;
    }
 
-   currentUser = Unicode_Alloc(pwd.pw_name, STRING_ENCODING_DEFAULT);
-#endif
-
- abort:
-   
-   free(buffer);
-   
-   return currentUser;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * VixToolsAuthenticateUser --
- *
- *    Check if the supplied credentials match a valid user account.
- *
- * Return value:
- *    VixError. VIX_OK if the credentials are valid, or an appropriate
- *    error otherwise.
- *
- * Side effects:
- *    None
- *
- *-----------------------------------------------------------------------------
- */
-
-VixError
-VixToolsAuthenticateUser(const char *username,    // IN
-                         const char *password)    // IN
-{
-   VixError err = VIX_OK;
-
-#ifdef _WIN32
    /*
-    * Check if this is a valid account on the guest. We cannot use
-    * Auth_AuthenticateUser() on Windows, because it uses LogonUser()
-    * which requires the SE_TCB_NAME privilege, which is basically root.
+    * In the Windows version, GetUserNameW() returns the name of the
+    * user the thread is impersonating (if it is impersonating someone),
+    * so geteuid() seems to be the moral equivalent.
     */
-   err = VixToolsValidateUserCredentials(username,
-                                         password);
-   if (VIX_OK != err) {
-      goto abort;
-   }
-
-#else
-   AuthToken authToken;
+   currentUid = geteuid();
 
-   authToken = Auth_AuthenticateUser(username,
-                                     password);
-   if (NULL == authToken) {
-      err = VIX_E_GUEST_USER_PERMISSIONS;
+   if (currentUid != pwd.pw_uid) {
+      err = VIX_E_INTERACTIVE_SESSION_USER_MISMATCH;
       goto abort;
    }
 
-   Auth_CloseToken(authToken);
-#endif
+   err = VIX_OK;
 
-abort:
+ abort:
+   Util_ZeroFree(buffer, bufferSize);
 
+#endif
+   
    return err;
 }
 #endif  // #if defined(_WIN32) || defined(linux)
@@ -3897,17 +3848,16 @@ HRESULT
 VixToolsEnableDHCPOnPrimary(void)
 {
    HRESULT ret;
-   NicEntry *primaryNic;
+   GuestNic *primaryNic;
 
-   primaryNic = NetUtil_GetPrimaryNicEntry();
+   primaryNic = NetUtil_GetPrimaryNic();
    if (NULL == primaryNic) {
       return HRESULT_FROM_WIN32(GetLastError());
    }
 
-   ret = WMI_EnableDHCP(primaryNic->nicEntryProto.macAddress);
-   
-   GuestInfo_FreeDynamicMemoryInNic(primaryNic);
-
+   ret = WMI_EnableDHCP(primaryNic->macAddress);
+   VMX_XDR_FREE(xdr_GuestNic, primaryNic);
+   free(primaryNic);
    return ret;
 }
 
@@ -3935,8 +3885,8 @@ VixToolsEnableStaticOnPrimary(const char *ipAddr,       // IN
                               const char *subnetMask)   // IN
 {
    HRESULT ret;
-   NicEntry *primaryNic;
-   VmIpAddressEntry *primaryIpEntry;
+   GuestNic *primaryNic;
+   VmIpAddress *primaryIp;
    char actualIpAddress[IP_ADDR_SIZE];
    char actualSubnetMask[IP_ADDR_SIZE];
 
@@ -3948,7 +3898,7 @@ VixToolsEnableStaticOnPrimary(const char *ipAddr,       // IN
    actualIpAddress[0] = '\0';
    actualSubnetMask[0] = '\0';
 
-   primaryNic = NetUtil_GetPrimaryNicEntry();
+   primaryNic = NetUtil_GetPrimaryNic();
    if (NULL == primaryNic) {
       return HRESULT_FROM_WIN32(GetLastError());
    }
@@ -3956,9 +3906,8 @@ VixToolsEnableStaticOnPrimary(const char *ipAddr,       // IN
    /*
     * Set IP address if client provides it.
     */
-   primaryIpEntry = DblLnkLst_Container(primaryNic->ipAddressList.next,
-                                        VmIpAddressEntry, 
-                                        links);
+   
+   primaryIp = &primaryNic->ips.ips_val[0];
  
    if ('\0' != ipAddr[0]) {
       Str_Strcpy(actualIpAddress,
@@ -3966,7 +3915,7 @@ VixToolsEnableStaticOnPrimary(const char *ipAddr,       // IN
                  sizeof actualIpAddress);
    } else {
       Str_Strcpy(actualIpAddress,
-                 primaryIpEntry->ipEntryProto.ipAddress,
+                 primaryIp->ipAddress,
                  sizeof actualIpAddress);
    }
 
@@ -3979,16 +3928,16 @@ VixToolsEnableStaticOnPrimary(const char *ipAddr,       // IN
                  sizeof actualSubnetMask);
    } else {
       Str_Strcpy(actualSubnetMask,
-                 primaryIpEntry->ipEntryProto.subnetMask, 
+                 primaryIp->subnetMask,
                  sizeof actualSubnetMask);
    }
 
-   ret = WMI_EnableStatic(primaryNic->nicEntryProto.macAddress, 
+   ret = WMI_EnableStatic(primaryNic->macAddress, 
                           actualIpAddress, 
                           actualSubnetMask);
-   
-   GuestInfo_FreeDynamicMemoryInNic(primaryNic);
 
+   VMX_XDR_FREE(xdr_GuestNic, primaryNic);
+   free(primaryNic);
    return ret;
 }
 #endif
index e2ee54411592e8916a32d427ffad61341df84254..48f21f670a5c8bcaf438080eaa3fa2b7ced6a5d1 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 881a8f8f46863717d4a2b008cf9152231c4b59d6..71b049f918a14434542cc678bfd3025a475133b8 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 4f5a57f70386a29f8007c60d08c8fb9c3f746a14..5d6ccaf41e754d88d54c27640cd28f843711add1 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index ed3dee0e26f641bc5dd3c0486082c51302860662..7dd32de0b02cc1864bebef680dacddb389acd5ea 100644 (file)
@@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index e25f5a2e8f8155ffb22a6fbddbb7f0f42b68333f..654d089c8d6a89092d2216bec428a4303ca4a0ca 100644 (file)
@@ -20,6 +20,7 @@ lib_LTLIBRARIES = libguestlib.la
 libguestlib_la_LIBADD =
 libguestlib_la_LIBADD += ../lib/rpcOut/shared/libRpcOut.la
 libguestlib_la_LIBADD += ../lib/string/shared/libString.la
+libguestlib_la_LIBADD += ../lib/stubs/shared/libStubs.la
 # In the absence of the linker options --start-group and --end-group (which can't
 # be put in LDADD), we need to bring the following libraries out of the alphebetical
 # order so their symbols are properly resolved.
@@ -29,7 +30,6 @@ libguestlib_la_LIBADD += ../lib/backdoor/shared/libBackdoor.la
 libguestlib_la_SOURCES =
 libguestlib_la_SOURCES += vmGuestLib.c
 libguestlib_la_SOURCES += vmGuestLibPanic.c
-libguestlib_la_SOURCES += stubs.c
 
 libguestlib_la_LDFLAGS =
 # We require GCC, so we're fine passing compiler-specific flags.
index 0bfb44e9bcfe771d387a5cb181f370dfe8b20994..48b75cc90132eeeb70dee07d072c818a5960bda5 100644 (file)
@@ -68,9 +68,10 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libguestlib_la_DEPENDENCIES = ../lib/rpcOut/shared/libRpcOut.la \
        ../lib/string/shared/libString.la \
+       ../lib/stubs/shared/libStubs.la \
        ../lib/message/shared/libMessage.la \
        ../lib/backdoor/shared/libBackdoor.la
-am_libguestlib_la_OBJECTS = vmGuestLib.lo vmGuestLibPanic.lo stubs.lo
+am_libguestlib_la_OBJECTS = vmGuestLib.lo vmGuestLibPanic.lo
 libguestlib_la_OBJECTS = $(am_libguestlib_la_OBJECTS)
 libguestlib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -167,6 +168,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -237,9 +239,10 @@ lib_LTLIBRARIES = libguestlib.la
 # order so their symbols are properly resolved.
 libguestlib_la_LIBADD = ../lib/rpcOut/shared/libRpcOut.la \
        ../lib/string/shared/libString.la \
+       ../lib/stubs/shared/libStubs.la \
        ../lib/message/shared/libMessage.la \
        ../lib/backdoor/shared/libBackdoor.la
-libguestlib_la_SOURCES = vmGuestLib.c vmGuestLibPanic.c stubs.c
+libguestlib_la_SOURCES = vmGuestLib.c vmGuestLibPanic.c
 # We require GCC, so we're fine passing compiler-specific flags.
 # Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
 libguestlib_la_LDFLAGS = -Wl,-lc
@@ -312,7 +315,6 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmGuestLib.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmGuestLibPanic.Plo@am__quote@
 
index 521fef319ba91b849d2dfd86b257fdf5bd0067aa..fdad8430ecc2de45bff35a487da0383ea35fae12 100644 (file)
@@ -117,6 +117,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 58aa1faf3087ecb800e0bb2a532484032acf6fe1..b1f546280836802633de645bb994ffcd2599511b 100644 (file)
@@ -37,6 +37,8 @@ HEADERS := block.h
 HEADERS += vnode_if.h
 HEADERS += vmblock_k.h
 HEADERS += os.h
+HEADERS += compat_freebsd.h
+HEADERS += compat_vop.h
 
 CSRCS  := block.c
 CSRCS  += dbllnklst.c
diff --git a/open-vm-tools/modules/freebsd/vmblock/compat_freebsd.h b/open-vm-tools/modules/freebsd/vmblock/compat_freebsd.h
new file mode 100644 (file)
index 0000000..b501bca
--- /dev/null
@@ -0,0 +1,49 @@
+/*********************************************************
+ * Copyright (C) 2008 VMware, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of VMware Inc. nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission of VMware Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *********************************************************/
+
+#ifndef __COMPAT_FREEBSD_H__
+#define __COMPAT_FREEBSD_H__ 1
+
+#include <sys/param.h>
+#include "compat_vop.h"
+
+/*
+ * FreeBSD version 8 and above uses the kproc API instead of the kthread API in its
+ * kernel.
+ */
+#if __FreeBSD_version > 800001
+#define compat_kthread_create kproc_create
+#define compat_kthread_exit kproc_exit
+#else
+#define compat_kthread_create kthread_create
+#define compat_kthread_exit kthread_exit
+#endif
+
+#endif // __COMPAT_FREEBSD_H__
diff --git a/open-vm-tools/modules/freebsd/vmblock/compat_vop.h b/open-vm-tools/modules/freebsd/vmblock/compat_vop.h
new file mode 100644 (file)
index 0000000..f4380e0
--- /dev/null
@@ -0,0 +1,64 @@
+/*********************************************************
+ * Copyright (C) 2008 VMware, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of VMware Inc. nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission of VMware Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *********************************************************/
+
+#ifndef __COMPAT_VOP_H__
+#   define __COMPAT_VOP_H__ 1
+
+#if __FreeBSD_version >= 800011
+#define COMPAT_THREAD_VAR(varname, varval)
+#define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags))
+#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags))
+#define compat_lockstatus(lock, threadvar) lockstatus((lock))
+#define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam))
+#define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags))
+#else
+#define COMPAT_THREAD_VAR(varname, varval) struct thread *varname = varval
+#define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags), (threadvar))
+#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags), (threadvar))
+#define compat_lockstatus(lock, threadvar) lockstatus((lock), (threadvar))
+#define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags), (threadval))
+#define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam), (threadval))
+#endif
+
+/*
+ * We use defines rather than typedefs here to avoid causing problems for files that
+ * don't have a vnode_if.h available.
+ */
+#if __FreeBSD_version >= 700000
+#   define compat_vop_lock_t vop_lock1_t
+#   define compat_vop_lock_args struct vop_lock1_args
+#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock1
+#else
+#   define compat_vop_lock_t vop_lock_t
+#   define compat_vop_lock_args struct vop_lock_args
+#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock
+#endif
+
+#endif
index 213ac289f6f056f721eb657f64f98a82416e60bd..37bcaf1332d43f3555cf6ed87cd2bb0516628e4b 100644 (file)
 #include <sys/lock.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
+#include <sys/fcntl.h>
 #include <sys/namei.h>
 #include <sys/proc.h>
 #include <sys/vnode.h>
 
 #include "vmblock_k.h"
+#include "compat_freebsd.h"
 
 static MALLOC_DEFINE(M_VMBLOCKFSMNT, "VMBlockFS mount", "VMBlockFS mount structure");
 
@@ -187,7 +189,7 @@ VMBlockVFSMount(struct mount *mp,       // IN: mount(2) parameters
     * Make sure the node alias worked
     */
    if (error) {
-      VOP_UNLOCK(vp, 0, td);
+      COMPAT_VOP_UNLOCK(vp, 0, td);
       vrele(lowerrootvp);
       free(xmp, M_VMBLOCKFSMNT);   /* XXX */
       return error;
@@ -209,7 +211,7 @@ VMBlockVFSMount(struct mount *mp,       // IN: mount(2) parameters
    /*
     * Unlock the node (either the lower or the alias)
     */
-   VOP_UNLOCK(vp, 0, td);
+   COMPAT_VOP_UNLOCK(vp, 0, td);
 
    /*
     * If the staging area is a local filesystem, reflect that here, too.  (We
@@ -217,7 +219,7 @@ VMBlockVFSMount(struct mount *mp,       // IN: mount(2) parameters
     */
    MNT_ILOCK(mp);
    mp->mnt_flag |= lowerrootvp->v_mount->mnt_flag & MNT_LOCAL;
-#if BSD_VERSION >= 60
+#if __FreeBSD_version >= 600000
    mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
 #endif
    MNT_IUNLOCK(mp);
@@ -288,14 +290,14 @@ VMBlockVFSUnmount(struct mount *mp,     // IN: filesystem to unmount
     * transfer will happen atomically.  (Er, at least within the scope of
     * the vnode subsystem.)
     */
-   VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY|LK_INTERLOCK, td);
+   COMPAT_VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY|LK_INTERLOCK, td);
 
    removed = BlockRemoveAllBlocks(OS_UNKNOWN_BLOCKER);
 
    VI_LOCK(vp);
    vp->v_usecount -= removed;
    VI_UNLOCK(vp);
-   VOP_UNLOCK(vp, 0, td);
+   COMPAT_VOP_UNLOCK(vp, 0, td);
 
    if (mntflags & MNT_FORCE) {
       flags |= FORCECLOSE;
@@ -346,7 +348,7 @@ VMBlockVFSRoot(struct mount *mp,        // IN: vmblock file system
     */
    vp = MNTTOVMBLOCKMNT(mp)->rootVnode;
    VREF(vp);
-   vn_lock(vp, flags | LK_RETRY, td);
+   compat_vn_lock(vp, flags | LK_RETRY, td);
    *vpp = vp;
    return 0;
 }
index f3bf70c8a13291b5beff8607538dd8e5ccc32a1c..07974eea6ec07d17efcac7507e90f7e223452253 100644 (file)
@@ -326,7 +326,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -559,7 +574,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index b8fa9eb1bb1f0e736da6b0e486575a1e39d369e8..1f822c987780b81e7d34832577045032e96df32b 100644 (file)
 #include <sys/file.h>
 #include <sys/filedesc.h>
 #include <sys/kdb.h>
+#include "compat_freebsd.h"
+#if __FreeBSD_version >= 700000
+#include <sys/priv.h>
+#endif
 
 #include "vmblock_k.h"
 #include "vmblock.h"
@@ -210,7 +214,7 @@ static vop_getwritemount_t      VMBlockVopGetWriteMount;
 static vop_inactive_t           VMBlockVopInactive;
 static vop_ioctl_t              VMBlockVopIoctl;
 static vop_islocked_t           VMBlockVopIsLocked;
-static vop_lock_t               VMBlockVopLock;
+static compat_vop_lock_t        VMBlockVopLock;
 static vop_lookup_t             VMBlockVopLookup;
 static vop_open_t               VMBlockVopOpen;
 static vop_print_t              VMBlockVopPrint;
@@ -246,23 +250,23 @@ typedef struct VMBlockIoctlArgs VMBlockIoctlArgs;
  */
 
 struct vop_vector VMBlockVnodeOps = {
-   .vop_bypass =        VMBlockVopBypass,
-   .vop_access =        VMBlockVopAccess,
-   .vop_bmap =          VOP_EOPNOTSUPP,
-   .vop_getattr =       VMBlockVopGetAttr,
-   .vop_getwritemount = VMBlockVopGetWriteMount,
-   .vop_inactive =      VMBlockVopInactive,
-   .vop_ioctl =         VMBlockVopIoctl,
-   .vop_islocked =      VMBlockVopIsLocked,
-   .vop_lock =          VMBlockVopLock,
-   .vop_lookup =        VMBlockVopLookup,
-   .vop_open =          VMBlockVopOpen,
-   .vop_print =         VMBlockVopPrint,
-   .vop_reclaim =       VMBlockVopReclaim,
-   .vop_rename =        VMBlockVopRename,
-   .vop_setattr =       VMBlockVopSetAttr,
-   .vop_strategy =      VOP_EOPNOTSUPP,
-   .vop_unlock =        VMBlockVopUnlock,
+   .vop_bypass =                  VMBlockVopBypass,
+   .vop_access =                  VMBlockVopAccess,
+   .vop_bmap =                    VOP_EOPNOTSUPP,
+   .vop_getattr =                 VMBlockVopGetAttr,
+   .vop_getwritemount =           VMBlockVopGetWriteMount,
+   .vop_inactive =                VMBlockVopInactive,
+   .vop_ioctl =                   VMBlockVopIoctl,
+   .vop_islocked =                VMBlockVopIsLocked,
+   .COMPAT_VOP_LOCK_OP_ELEMENT =  VMBlockVopLock,
+   .vop_lookup =                  VMBlockVopLookup,
+   .vop_open =                    VMBlockVopOpen,
+   .vop_print =                   VMBlockVopPrint,
+   .vop_reclaim =                 VMBlockVopReclaim,
+   .vop_rename =                  VMBlockVopRename,
+   .vop_setattr =                 VMBlockVopSetAttr,
+   .vop_strategy =                VOP_EOPNOTSUPP,
+   .vop_unlock =                  VMBlockVopUnlock,
 };
 
 /*
@@ -560,7 +564,7 @@ struct vop_lookup_args {
 */
 {
    struct componentname *cnp = ap->a_cnp;
-   struct thread *td = cnp->cn_thread;
+   COMPAT_THREAD_VAR(td, cnp->cn_thread);
    struct vnode *dvp = ap->a_dvp;
    struct vnode *vp, *ldvp, *lvp;
    BlockHandle blockCookie;
@@ -599,15 +603,15 @@ struct vop_lookup_args {
    }
 
    if ((blockCookie = BlockLookup(pathname, OS_UNKNOWN_BLOCKER)) != NULL) {
-      int lkflags = lockstatus(dvp->v_vnlock, td) & LK_TYPE_MASK;
+      int lkflags = compat_lockstatus(dvp->v_vnlock, td) & LK_TYPE_MASK;
       lvp = VPTOVMB(dvp)->lowerVnode;
       vhold(dvp);
       vhold(lvp);
-      VOP_UNLOCK(dvp, 0, td);
+      COMPAT_VOP_UNLOCK(dvp, 0, td);
 
       error = BlockWaitOnFile(pathname, blockCookie);
 
-      VOP_LOCK(dvp, lkflags, td);
+      COMPAT_VOP_LOCK(dvp, lkflags, td);
       vdrop(lvp);
       vdrop(dvp);
       if (dvp->v_op != &VMBlockVnodeOps) {
@@ -720,7 +724,11 @@ struct vop_open_args {
        *      readdir() of the filesystem root for non-privileged users.
        */
       if ((retval = suser(ap->a_td)) == 0) {
+#if __FreeBSD_version >= 700000
+         fp = ap->a_fp;
+#else
          fp = ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx];
+#endif
          fp->f_ops = &VMBlockFileOps;
       }
    } else {
@@ -818,7 +826,7 @@ struct vop_ioctl_args {
 {
    VMBlockIoctlArgs *ioctlArgs = (VMBlockIoctlArgs *)ap->a_data;
    VMBlockMount *mp;
-   struct thread *td = ap->a_td;
+   COMPAT_THREAD_VAR(td, ap->a_td);
    struct vnode *vp = ap->a_vp;
    char *pathbuf = NULL;
    int ret = 0, pathlen;
@@ -833,10 +841,10 @@ struct vop_ioctl_args {
     *       may be invalid.
     *   2.  Make sure the filesystem isn't being unmounted.
     */
-   VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY, td);
+   COMPAT_VOP_LOCK(vp, LK_EXCLUSIVE|LK_RETRY, td);
    if (vp->v_op != &VMBlockVnodeOps ||
        vp->v_mount->mnt_kern_flag & MNTK_UNMOUNT) {
-      VOP_UNLOCK(vp, 0, td);
+      COMPAT_VOP_UNLOCK(vp, 0, td);
       return EBADF;
    }
 
@@ -853,7 +861,7 @@ struct vop_ioctl_args {
        * argument before passing to the lower layer.
        */
       ap->a_data = ioctlArgs->data;
-      VOP_UNLOCK(vp, 0, td);
+      COMPAT_VOP_UNLOCK(vp, 0, td);
       return VMBlockVopBypass((struct vop_generic_args *)ap);
    }
 
@@ -921,7 +929,7 @@ struct vop_ioctl_args {
       ret = EOPNOTSUPP;
    }
 
-   VOP_UNLOCK(vp, 0, td);
+   COMPAT_VOP_UNLOCK(vp, 0, td);
    if (pathbuf) {
       uma_zfree(VMBlockPathnameZone, pathbuf);
    }
@@ -1100,18 +1108,18 @@ struct vop_rename_args {
  */
 
 static int
-VMBlockVopLock(struct vop_lock_args *ap)
+VMBlockVopLock(compat_vop_lock_args *ap)
 /*
-struct vop_lock_args {
-   struct vnode *vp;    // IN: vnode operand 
-   int flags;           // IN: lockmgr(9) flags
-   struct thread *td;   // IN: calling thread's context
-};
+struct {
+   struct vnode *a_vp;    // IN: vnode operand 
+   int a_flags;           // IN: lockmgr(9) flags
+   struct thread *a_td;   // IN: calling thread's context
+} *ap;
 */
 {
    struct vnode *vp = ap->a_vp;
    int flags = ap->a_flags;
-   struct thread *td = ap->a_td;
+   COMPAT_THREAD_VAR(td, ap->a_td);
    struct VMBlockNode *nn;
    struct vnode *lvp;
    int error;
@@ -1139,7 +1147,7 @@ struct vop_lock_args {
        * We prevent it from being recycled by holding the vnode here.
        */
       vholdl(lvp);
-      error = VOP_LOCK(lvp, flags, td);
+      error = COMPAT_VOP_LOCK(lvp, flags, td);
 
       /*
        * We might have slept to get the lock and someone might have clean
@@ -1161,7 +1169,7 @@ struct vop_lock_args {
             panic("Unsupported lock request %d\n",
                 ap->a_flags);
          }
-         VOP_UNLOCK(lvp, 0, td);
+         COMPAT_VOP_UNLOCK(lvp, 0, td);
          error = vop_stdlock(ap);
       }
       vdrop(lvp);
@@ -1205,7 +1213,7 @@ struct vop_unlock_args {
 {
    struct vnode *vp = ap->a_vp;
    int flags = ap->a_flags;
-   struct thread *td = ap->a_td;
+   COMPAT_THREAD_VAR(td, ap->a_td);
    struct VMBlockNode *nn;
    struct vnode *lvp;
    int error;
@@ -1220,7 +1228,7 @@ struct vop_unlock_args {
    }
    nn = VPTOVMB(vp);
    if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) {
-      error = VOP_UNLOCK(lvp, flags, td);
+      error = COMPAT_VOP_UNLOCK(lvp, flags, td);
    } else {
       error = vop_stdunlock(ap);
    }
@@ -1255,9 +1263,9 @@ struct vop_islocked_args {
 */
 {
    struct vnode *vp = ap->a_vp;
-   struct thread *td = ap->a_td;
+   COMPAT_THREAD_VAR(td, ap->a_td);
 
-   return lockstatus(vp->v_vnlock, td);
+   return compat_lockstatus(vp->v_vnlock, td);
 }
 
 
@@ -1371,7 +1379,7 @@ struct vop_reclaim_args {
     * to the lower layer's lock.)
     */
    vp->v_vnlock = &vp->v_lock;
-   lockmgr(vp->v_vnlock, LK_EXCLUSIVE|LK_INTERLOCK, VI_MTX(vp), curthread);
+   compat_lockmgr(vp->v_vnlock, LK_EXCLUSIVE|LK_INTERLOCK, VI_MTX(vp), curthread);
    vput(lowervp);
 
    /*
index 4d97c631554147a12c555544c2833de04e6adc77..00cf94a0f2904688d2301f4029894c4cf7988c15 100644 (file)
@@ -27,6 +27,8 @@ HEADERS += kernelStubs.h
 HEADERS += fsutil.h
 HEADERS += vnopscommon.h
 HEADERS += os.h
+HEADERS += compat_freebsd.h
+HEADERS += compat_vop.h
 
 COMMON_SRCS := cpName.c
 COMMON_SRCS += cpNameLinux.c
diff --git a/open-vm-tools/modules/freebsd/vmhgfs/compat_freebsd.h b/open-vm-tools/modules/freebsd/vmhgfs/compat_freebsd.h
new file mode 100644 (file)
index 0000000..9c06efe
--- /dev/null
@@ -0,0 +1,37 @@
+/*********************************************************
+ * Copyright (C) 2008 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ *********************************************************/
+
+#ifndef __COMPAT_FREEBSD_H__
+#define __COMPAT_FREEBSD_H__ 1
+
+#include <sys/param.h>
+#include "compat_vop.h"
+
+/*
+ * FreeBSD version 8 and above uses the kproc API instead of the kthread API in its
+ * kernel.
+ */
+#if __FreeBSD_version > 800001
+#define compat_kthread_create kproc_create
+#define compat_kthread_exit kproc_exit
+#else
+#define compat_kthread_create kthread_create
+#define compat_kthread_exit kthread_exit
+#endif
+
+#endif // __COMPAT_FREEBSD_H__
diff --git a/open-vm-tools/modules/freebsd/vmhgfs/compat_vop.h b/open-vm-tools/modules/freebsd/vmhgfs/compat_vop.h
new file mode 100644 (file)
index 0000000..521e046
--- /dev/null
@@ -0,0 +1,52 @@
+/*********************************************************
+ * Copyright (C) 2008 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ *********************************************************/
+
+#ifndef __COMPAT_VOP_H__
+#   define __COMPAT_VOP_H__ 1
+
+#if __FreeBSD_version >= 800011
+#define COMPAT_THREAD_VAR(varname, varval)
+#define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags))
+#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags))
+#define compat_lockstatus(lock, threadvar) lockstatus((lock))
+#define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam))
+#define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags))
+#else
+#define COMPAT_THREAD_VAR(varname, varval) struct thread *varname = varval
+#define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags), (threadvar))
+#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags), (threadvar))
+#define compat_lockstatus(lock, threadvar) lockstatus((lock), (threadvar))
+#define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags), (threadval))
+#define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam), (threadval))
+#endif
+
+/*
+ * We use defines rather than typedefs here to avoid causing problems for files that
+ * don't have a vnode_if.h available.
+ */
+#if __FreeBSD_version >= 700000
+#   define compat_vop_lock_t vop_lock1_t
+#   define compat_vop_lock_args struct vop_lock1_args
+#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock1
+#else
+#   define compat_vop_lock_t vop_lock_t
+#   define compat_vop_lock_args struct vop_lock_args
+#   define COMPAT_VOP_LOCK_OP_ELEMENT vop_lock
+#endif
+
+#endif
index 02bbbf2a337e41cc56ff23ae05077c41aedb3a5f..bf40f6f76b48d699e1b490abec28212e10671180 100644 (file)
 #include "includeCheck.h"
 #include "vm_assert.h"
 
+/*
+ * Maximum number of pages to transfer to/from the HGFS server for V3 protocol
+ * operations that support large requests/replies, e.g. reads and writes.
+ */
+#define HGFS_LARGE_IO_MAX_PAGES  15
 
 /*
  * Maximum allowed packet size in bytes. All hgfs code should be made
  */
 #define HGFS_PACKET_MAX 6144
 
+/*
+ * The HGFS_LARGE_PACKET_MAX size is used to allow guests to make
+ * read / write requests of sizes larger than HGFS_PACKET_MAX. The larger size
+ * can only be used with server operations that are specified to be large packet
+ * capable in hgfsProto.h.
+ */
+#define HGFS_LARGE_PACKET_MAX ((4096 * HGFS_LARGE_IO_MAX_PAGES) + 2048)
+
+/* Maximum number of bytes to read or write to a hgfs server in a single packet. */
+#define HGFS_IO_MAX 4096
+
+/* Maximum number of bytes to read or write to a V3 server in a single hgfs packet. */
+#define HGFS_LARGE_IO_MAX (HGFS_LARGE_IO_MAX_PAGES * 4096)
 
 /*
  * Open mode
@@ -113,8 +131,8 @@ typedef enum {
  * error codes travelled from hgfsProto.h to hgfs.h in that same change. Worse,
  * we GA'ed a product (Server 1.0) this way.
  *
- * XXX: I've reversed the order because otherwise new HGFS clients working 
- * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR 
+ * XXX: I've reversed the order because otherwise new HGFS clients working
+ * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR
  * when the server sent them HGFS_STATUS_INVALID_NAME. This was a problem
  * the Linux client converts HGFS_STATUS_GENERIC_ERROR to -EIO, which causes
  * HgfsLookup to fail unexpectedly (normally HGFS_STATUS_INVALID_NAME is
@@ -136,6 +154,7 @@ typedef enum {
    HGFS_STATUS_NO_SPACE,
    HGFS_STATUS_OPERATION_NOT_SUPPORTED,
    HGFS_STATUS_NAME_TOO_LONG,
+   HGFS_STATUS_INVALID_PARAMETER,
 } HgfsStatus;
 
 /*
@@ -150,9 +169,9 @@ typedef enum {
  * the command and the space into some buffer that is then sent over the
  * backdoor.
  *
- * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest 
- * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates 
- * back to when the host was to send raw TCL code to the guest (TCL Out == 
+ * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest
+ * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates
+ * back to when the host was to send raw TCL code to the guest (TCL Out ==
  * TCLO).
  *
  * In Guest --> Host RPC traffic, the guest endpoint is RpcOut and the host
@@ -161,11 +180,11 @@ typedef enum {
 
 /*
  * When an RPCI listener registers for this command, HGFS requests are expected
- * to be synchronously sent from the guest and replies are expected to be 
+ * to be synchronously sent from the guest and replies are expected to be
  * synchronously returned.
- * 
- * When an RpcIn listener registers for this command, requests are expected to 
- * be asynchronously sent from the host and synchronously returned from the 
+ *
+ * When an RpcIn listener registers for this command, requests are expected to
+ * be asynchronously sent from the host and synchronously returned from the
  * guest.
  *
  * In short, an endpoint sending this command is sending a request whose reply
@@ -175,7 +194,7 @@ typedef enum {
 #define HGFS_SYNC_REQREP_CLIENT_CMD HGFS_SYNC_REQREP_CMD " "
 #define HGFS_SYNC_REQREP_CLIENT_CMD_LEN (sizeof HGFS_SYNC_REQREP_CLIENT_CMD - 1)
 
-/* 
+/*
  * This is just for the sake of macro naming. Since we are guaranteed
  * equal command lengths, defining command length via a generalized macro name
  * will prevent confusion.
index fa2fefc304a22f666d2dca061281578d5284dfca..85bc08074c3d3c37cdcdac38b9e1ff5ca14cf27b 100644 (file)
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsBd_GetBuf --
+ * HgfsBdGetBufInt --
  *
- *    Get a buffer to send hgfs requests in.
+ *    Allocates a buffer to send a hgfs request in. This can be either a
+ *    HGFS_PACKET_MAX or HGFS_LARGE_PACKET_MAX size buffer depending on the
+ *    external funciton called.
  *
  * Results:
  *    Pointer to a buffer that has the correct backdoor command prefix for 
  *    NULL on failure (not enough memory).
  *
  * Side effects:
- *    None
+ *    None.
  *
  *-----------------------------------------------------------------------------
  */
 
-char *
-HgfsBd_GetBuf(void)
+static char *
+HgfsBdGetBufInt(size_t bufSize)
 {
    /* 
     * Allocate a buffer that is large enough for an HGFS packet and the 
     * synchronous HGFS command, write the command, and return a pointer that 
     * points into the buffer, after the command.
     */
-   size_t len = HGFS_PACKET_MAX + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
+   size_t len = bufSize + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
    char *buf = (char*) calloc(sizeof(char), len);
 
    if (!buf) {
@@ -79,6 +81,51 @@ HgfsBd_GetBuf(void)
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetBuf --
+ *
+ *    Get a buffer of size HGFS_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_PACKET_MAX);
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetLargeBuf --
+ *
+ *    Get a buffer of size HGFS_LARGE_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetLargeBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_LARGE_PACKET_MAX);
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -215,7 +262,7 @@ HgfsBd_Dispatch(RpcOut *out,            // IN: Channel to send on
       return -1;
    }
 
-   ASSERT(replyLen <= HGFS_PACKET_MAX);
+   ASSERT(replyLen <= HGFS_LARGE_PACKET_MAX);
    *packetOut = reply;
    *packetSize = replyLen;
 
index 10ccec0c1366e37d3763c2053c4bd80986356b39..39ab8e7fa6faeb51d53bf35e2d3f1e6585e1eb81 100644 (file)
@@ -29,6 +29,8 @@
 
 char *HgfsBd_GetBuf(void);
 
+char *HgfsBd_GetLargeBuf(void);
+
 void HgfsBd_PutBuf(char *);
 
 RpcOut *HgfsBd_GetChannel(void);
index 66cd10036326735177609e7eae6614f083b7cea1..136602d6ac5d3ffd08f853299e7be4c09468cb44 100644 (file)
@@ -660,7 +660,10 @@ struct HgfsReplyRead {
 HgfsReplyRead;
 
 
-/* Version 3 of HgfsReplyOpen */
+/*
+ * Version 3 of HgfsRequestRead.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
 
 typedef
 #include "vmware_pack_begin.h"
@@ -711,6 +714,11 @@ struct HgfsReplyWrite {
 #include "vmware_pack_end.h"
 HgfsReplyWrite;
 
+/*
+ * Version 3 of HgfsRequestWrite.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
+
 typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestWriteV3 {
index 6b259f43b80b464e8fcbf8da20fd4e1a6f39f6fd..0f85b57c552a9510dac126e0b3174fbf6049322d 100644 (file)
@@ -142,7 +142,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
  *
  * Results:
  *    0       on success
- *    nonzero if time is not representable on UNIX 
+ *    nonzero if time is not representable on UNIX
  *
  * Side effects:
  *    None
@@ -156,7 +156,7 @@ HgfsConvertFromNtTime(time_t *unixTime, // OUT: Time in UNIX format
 {
    struct timespec tm;
    int ret;
-   
+
    ret = HgfsConvertFromNtTimeNsec(&tm, ntTime);
    *unixTime = tm.tv_sec;
    return ret;
@@ -215,6 +215,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_NO_SPACE;
    case ERROR_NOT_SUPPORTED:
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
+   case ERROR_INVALID_PARAMETER:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
@@ -253,6 +255,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
    case ENAMETOOLONG:
       return HGFS_STATUS_NAME_TOO_LONG;
+   case EPARAMETERNOTSUPPORTED:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
index 1b98bf76147c5f87d2e68bc3a3a3b9970f2b16ac..025b415722ee725fd26970e766539d91560bc8ae 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * hgfsUtil.h --
- * 
+ *
  *    Utility functions and macros used by hgfs.
  */
 
 
 #   if defined(__linux__) && defined(__KERNEL__)
 #      include "driver-config.h"
-#      include <linux/time.h> // for time_t and timespec  
+#      include <linux/time.h> // for time_t and timespec
     /* Include time.h in userspace code, but not in Solaris kernel code. */
 #   elif defined(__FreeBSD__) && defined(_KERNEL)
     /* Do nothing. */
 #   elif defined(__APPLE__) && defined(KERNEL)
 #      include <sys/time.h>
-#   else 
+#   else
 #      include <time.h>
-#   endif 
+#   endif
 #   include "vm_basic_types.h"
 #   if !defined(_STRUCT_TIMESPEC) &&   \
        !defined(_TIMESPEC_DECLARED) && \
@@ -71,15 +71,27 @@ struct timespec {
     typedef DWORD HgfsInternalStatus;
 #endif
 
-/* 
- * Unfortunately, we need a catch-all "generic error" to use with 
+/*
+ * Unfortunately, we need a catch-all "generic error" to use with
  * HgfsInternalStatus, because there are times when cross-platform code needs
- * to return its own errors along with errors from platform specific code. 
+ * to return its own errors along with errors from platform specific code.
  *
  * Using -1 should be safe because we expect our platforms to use zero as
  * success and a positive range of numbers as error values.
  */
-#define HGFS_INTERNAL_STATUS_ERROR -1
+#define HGFS_INTERNAL_STATUS_ERROR (-1)
+
+#ifndef _WIN32
+/*
+ * This error code is used to notify the client that some of the parameters passed
+ * (e.g. file handles) are not supported. Clients are expected to correct
+ * the parameter (e.g. pass file name instead) and retry.
+ *
+ * Note that this error code is artificially made up and in future may conflict
+ * with an "official" error code when added.
+ */
+#define EPARAMETERNOTSUPPORTED  (MAX_INT32 - 1)
+#endif
 
 /*
  * FreeBSD (pre-6.0) does not define EPROTO, so we'll define our own error code.
index ace958a598f5587ad2f94110384cbdb547962c05..54b7dba3e6d0e87355723a9f09b51f2371190a9c 100644 (file)
@@ -67,9 +67,6 @@
  */
 #define HGFS_BLOCKSIZE                  1024
 
-/* Maximum amount of data that can be transferred in any one request */
-#define HGFS_IO_MAX                     4096
-
 /* Internal error code(s) */
 #define HGFS_ERR                        (-1)
 #define HGFS_ERR_NULL_INPUT             (-50)
index 4f1b2b46df1ecf6eecb035d56761534e4604bec3..573cbe961d2c5e08202cb8f8943ed3c1df552da1 100644 (file)
@@ -37,6 +37,7 @@
 #include "vm_basic_types.h"
 #include "os.h"
 #include "debug.h"
+#include "compat_freebsd.h"
 
 /*
  * Malloc tag for statistics, debugging, etc.
@@ -642,8 +643,8 @@ os_thread_create(void *function,           // IN
                 const char *threadName,   // IN
                 OS_THREAD_T *newThread)   // OUT
 {
-   return kthread_create(function, parameter,
-                        newThread, 0, 0, threadName);
+   return compat_kthread_create(function, parameter,
+                                newThread, 0, 0, threadName);
 }
 
 
@@ -720,7 +721,7 @@ os_thread_release(OS_THREAD_T thread) // IN
 void
 os_thread_exit(int errorCode) // IN
 {
-   kthread_exit(errorCode);
+   compat_kthread_exit(errorCode);
 }
 
 
index f5fbd7d020ef22f55877f45dccfa41f72f1720f7..a08b6d148abe18261389985aded7a00120f09a9e 100644 (file)
@@ -29,6 +29,8 @@
 
 #if defined(__FreeBSD__)
 #  include <sys/param.h>          // for <everything>
+#  include <sys/proc.h>
+#  include <sys/condvar.h>
 #  include <sys/lock.h>           // for struct mtx
 #  include <sys/mutex.h>          // for struct mtx
 #  include <sys/sx.h>
index 0138cb5694d436b13edbf3fe68af72d451acf1d3..cae8059da1488117ad0f1918859434ef82c8c0e7 100644 (file)
@@ -31,6 +31,7 @@
 #  include <sys/libkern.h>
 #  include <sys/malloc.h>
 #  include "sha1.h"
+#  include "compat_freebsd.h"
 #elif defined(__APPLE__)
 #  include <string.h>
 /*
@@ -1064,7 +1065,7 @@ HgfsVnodeGetInt(struct vnode **vpp,        // OUT:  Filled with address of creat
    /*
     * Return a locked vnode to the caller.
     */
-   lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, curthread);
+   compat_lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, curthread);
 
    /*
     * Now we'll initialize the vnode.  We need to set the file type, vnode
index 5fa91aa1b5af29c2bf49bc16a70d20e6656df18b..aa0ed32e52baee36d6ea9ee8d0b0cb6e8e2f0ca5 100644 (file)
 #include <sys/malloc.h>
 #include <sys/kernel.h>
 #include <sys/systm.h>
+#if __FreeBSD_version >= 700000
+#include <sys/priv.h>
+#endif
 
 #include "hgfs_kernel.h"
 #include "request.h"
 #include "debug.h"
 #include "os.h"
+#include "compat_freebsd.h"
 
 /*
  * Local functions (prototypes)
@@ -64,7 +68,9 @@ static struct vfsops HgfsVfsOps = {
    .vfs_vget            = vfs_stdvget,
    .vfs_fhtovp          = vfs_stdfhtovp,
    .vfs_checkexp        = vfs_stdcheckexp,
+#if __FreeBSD_version < 700000
    .vfs_vptofh          = vfs_stdvptofh,
+#endif
    .vfs_init            = HgfsVfsInit,
    .vfs_uninit          = HgfsVfsUninit,
    .vfs_extattrctl      = vfs_stdextattrctl,
@@ -164,7 +170,7 @@ HgfsVfsMount(struct mount *mp,  // IN: structure representing the file system
    sip->rootVnode = vp;
 
    /* We're finished with the root vnode, so unlock it. */
-   VOP_UNLOCK(vp, 0, td);
+   COMPAT_VOP_UNLOCK(vp, 0, td);
 
    /*
     * Initialize this file system's Hgfs requests container.
index 4f8213b032d0d7a9304d9bc0a565afc5344e54ec..c6c9b9e3976e85d1df1fd031ffaf0ec30b60e8e8 100644 (file)
@@ -303,42 +303,42 @@ Mul64x3264(uint64 multiplicand, uint32 multiplier, uint32 shift)
     * smart enough, at least in the version we are currently using.
     */
    if (shift < 32) {
-      asm("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
-          "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
-          "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
-          "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
-          "shrdl %1, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // use in shrdl requires it to be a register
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
+              "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
+              "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
+              "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
+              "shrdl %1, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // use in shrdl requires it to be a register
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    } else {
-      asm("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
-          "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
-          "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
-          "shrl  %%cl, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // could be "=&rm" but "m" is slower
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
+              "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
+              "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
+              "shrl  %%cl, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // could be "=&rm" but "m" is slower
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    }
    return result;
 }
@@ -415,38 +415,38 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result;
    uint32 tmp1, tmp2;
    // ASSERT(shift >= 0 && shift < 64);
-  
+
    /* Written and tested by mann, checked by dbudko and hpreg */
    /* XXX hpreg suggested some improvements that we haven't converged on yet */
-   asm("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
-       "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
-       "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
-       "jl    0f\n\t"             // Go if negative
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "jmp   1f\n"
-    "0:\n\t"
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
-    "1:\n\t"
-       "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
-       "mov   %%edx, %1\n\t"      // Save hi(p2)
-       "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
-       "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
-       "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
-       "cmpl  $32, %%ecx\n\t"     // shift < 32?
-       "jl    2f\n\t"             // Go if so
-       "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
-       "mov   %1, %%edx\n\t"
-       "shrdl %%edx, %%eax\n\t"
-       "sarl  %%cl, %%edx\n\t"
-       "jmp   3f\n"
-    "2:\n\t"
-       "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
-       "shrdl %1, %%edx\n"
-    "3:\n\t"
-       : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
-       : "0" (multiplicand), "rm" (multiplier), "c" (shift)
-       : "cc");
+   __asm__("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
+           "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
+           "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
+           "jl    0f\n\t"             // Go if negative
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "jmp   1f\n"
+        "0:\n\t"
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
+        "1:\n\t"
+           "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
+           "mov   %%edx, %1\n\t"      // Save hi(p2)
+           "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
+           "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
+           "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
+           "cmpl  $32, %%ecx\n\t"     // shift < 32?
+           "jl    2f\n\t"             // Go if so
+           "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
+           "mov   %1, %%edx\n\t"
+           "shrdl %%edx, %%eax\n\t"
+           "sarl  %%cl, %%edx\n\t"
+           "jmp   3f\n"
+        "2:\n\t"
+           "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
+           "shrdl %1, %%edx\n"
+        "3:\n\t"
+           : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
+           : "0" (multiplicand), "rm" (multiplier), "c" (shift)
+           : "cc");
    return result;
 }
 
index 26c2ca7f0f26e0922cafa9973d445bf309ad79fe..054660eda55cacc8f6529b72c6e6c1f36b4cfe77 100644 (file)
@@ -162,14 +162,14 @@ Mul64x3264(uint64 multiplicand,
    uint64 result, dummy;
    const uint64 multiplier64 = multiplier;
 
-   asm("mulq    %3      \n\t"
-       "shrdq   %1, %0  \n\t"
-       : "=a" (result),
-         "=d" (dummy)
-       : "0"  (multiplier64),
-         "rm" (multiplicand),
+   __asm__("mulq    %3      \n\t"
+           "shrdq   %1, %0  \n\t"
+           : "=a" (result),
+             "=d" (dummy)
+           : "0"  (multiplier64),
+             "rm" (multiplicand),
          "c"  (shift)
-       : "cc");
+           : "cc");
    return result;
 }
 
@@ -221,7 +221,7 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result, dummy;
    const int64 multiplier64 = multiplier;
 
-   asm("imulq   %3      \n\t"
+   __asm__("imulq   %3      \n\t"
        "shrdq   %1, %0  \n\t"
        : "=a" (result),
          "=d" (dummy)
index 41b969b875b2e00fcee847b5b5b52f246616abf3..c5399a86d2dd9f6d132b888ce3a55bf1ce8a6a6d 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index 4ae8b62258207e3b7f9e53c6716c767084a05eee..3dbed314149ac7db4fd12000fa45456219f36ae9 100644 (file)
@@ -105,6 +105,7 @@ static vop_print_t  HgfsVopPrint;
  * HGFS vnode operations vector
  */
 struct vop_vector HgfsVnodeOps = {
+   .vop_default                = &default_vnodeops,
    .vop_lookup          = HgfsVopLookup,
    .vop_create          = HgfsVopCreate,
    .vop_open            = HgfsVopOpen,
@@ -122,29 +123,6 @@ struct vop_vector HgfsVnodeOps = {
    .vop_inactive        = HgfsVopInactive,
    .vop_reclaim         = HgfsVopReclaim,
    .vop_print           = HgfsVopPrint,
-
-   /*
-    * The following operations are not supported directly by the Hgfs module,
-    * so we fall back to the kernel's default support routines.  (Most cases
-    * return EOPNOTSUPP or EINVAL.
-    */
-   .vop_advlock         = VOP_EINVAL,
-   .vop_bmap            = vop_stdbmap,
-   .vop_bypass          = VOP_EOPNOTSUPP,
-   .vop_fsync           = VOP_NULL,
-   .vop_getpages        = vop_stdgetpages,
-   .vop_getwritemount   = vop_stdgetwritemount,
-   .vop_ioctl           = VOP_ENOTTY,
-   .vop_islocked        = vop_stdislocked,
-   .vop_kqfilter        = vop_stdkqfilter,
-   .vop_lease           = VOP_NULL,
-   .vop_lock            = vop_stdlock,
-   .vop_pathconf        = VOP_EINVAL,
-   .vop_poll            = vop_nopoll,
-   .vop_putpages        = vop_stdputpages,
-   .vop_readlink        = VOP_EINVAL,
-   .vop_revoke          = VOP_PANIC,
-   .vop_unlock          = vop_stdunlock,
 };
 
 
index ef07e636ef3b60bedcb732cf8b5e12f70b0d6606..8cf44e4d567efc365dd1137c46016b58fef52bfd 100644 (file)
@@ -54,17 +54,36 @@ typedef union CPUIDRegsUnion {
 } CPUIDRegsUnion;
 
 /*
- * Results of calling cpuid(eaxArg, ecxArg) on all logical processors. 
+ * Results of calling cpuid(eax, ecx) on all host logical CPU.
  */
 #ifdef _MSC_VER
 #pragma warning (disable :4200) // non-std extension: zero-sized array in struct
 #endif
 
-typedef struct CPUIDResult {
-   uint32 numLogicalCPUs;
-   uint32 eaxArg, ecxArg;
-   CPUIDRegs regs[0];
-} CPUIDResult;
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDReply {
+   /*
+    * Unique host logical CPU identifier. It does not change across queries, so
+    * we use it to correlate the replies of multiple queries.
+    */
+   uint64 tag;                // OUT
+
+   CPUIDRegs regs;            // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDReply;
+
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDQuery {
+   uint32 eax;                // IN
+   uint32 ecx;                // IN
+   uint32 numLogicalCPUs;     // IN/OUT
+   CPUIDReply logicalCPUs[0]; // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDQuery;
 
 /*
  * CPUID levels the monitor caches and ones that are not cached, but
@@ -315,10 +334,10 @@ FLAGDEF(   6, ECX, INTEL,   0,  1, HW_COORD_FEEDBACK,   IGNORE,  0, FALSE)
 
 /*    LEVEL, REG, VENDOR, POS, SIZE, NAME,   MASK TYPE, SET TO, CPL3, [FUNC] */
 #define CPUID_FIELD_DATA_LEVEL_A                                               \
-FIELDDEF(  A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE, PMC_VERSION) \
 FIELDDEFA( A, EAX, INTEL,   8,  8, NUM_PMCS,            IGNORE,  0, FALSE, NUM_PMCS)  \
 FIELDDEF(  A, EAX, INTEL,  16,  8, PMC_BIT_WIDTH,       IGNORE,  0, FALSE)            \
-FIELDDEF(  A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE, PMC_EBX_LENGTH) \
 FLAGDEF(   A, EBX, INTEL,   0,  1, PMC_CORE_CYCLE,      IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   1,  1, PMC_INSTR_RETIRED,   IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   2,  1, PMC_REF_CYCLES,      IGNORE,  0, FALSE)            \
@@ -458,7 +477,11 @@ FIELDDEF( 8A, EDX, AMD,     4, 28, SVMEDX_RSVD,         MASK,    0, FALSE)
                       CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FIELDDEFA(lvl, reg, vend, bitpos, size, name, m, v, c3, f)      \
-         FIELDDEF(lvl, reg, vend, bitpos, size, name, m, v, c3)
+   CPUID_##vend##_ID##lvl##reg##_##name##_SHIFT = bitpos,               \
+   CPUID_##vend##_ID##lvl##reg##_##name##_MASK  =                       \
+                      VMW_BIT_MASK(size) << bitpos,                     \
+   CPUID_FEATURE_##vend##_ID##lvl##reg##_##name =                       \
+                      CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FLAGDEFA FIELDDEFA
 #define FLAGDEF FIELDDEF
@@ -796,6 +819,33 @@ CPUID_RequiresFence(CpuidVendors vendor, // IN
 }
 
 
+/*
+ *----------------------------------------------------------------------
+ *
+ * CPUID_CountsCPUIDAsBranch --
+ *
+ *      Returns TRUE iff the cpuid given counts CPUID as a branch
+ *      (i.e. is a pre-Merom E CPU).
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE Bool
+CPUID_CountsCPUIDAsBranch(uint32 v) /* %eax from CPUID with %eax=1 */
+{
+   /* 
+    * CPUID no longer a branch starting with Merom E. Bug 148411.
+    * Penryn (Extended Model: 1) also has this fixed.
+    *
+    * Merom E is: CPUID.1.eax & 0xfff = 0x6f9
+    */
+   return !(CPUID_FAMILY_IS_P6(v) &&
+            (CPUID_EFFECTIVE_MODEL(v) > CPUID_MODEL_CORE2 ||
+             (CPUID_EFFECTIVE_MODEL(v) == CPUID_MODEL_CORE2 &&
+              CPUID_STEPPING(v) >= 9)));
+}
+
+
 /* 
  * The following low-level functions compute the number of
  * cores per cpu.  They should be used cautiously because
@@ -828,4 +878,5 @@ CPUID_IsHypervisorLevel(uint32 level, uint32 *offset)
    return (level & 0xffffff00) == 0x40000000;
 }
 
+
 #endif
index 41b969b875b2e00fcee847b5b5b52f246616abf3..c5399a86d2dd9f6d132b888ce3a55bf1ce8a6a6d 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index e7e80e87c804fe0190152382ee0a0f05dd861d40..caf15f4b2e704ac4efc53e9a65e6359201e9d9e6 100644 (file)
@@ -932,6 +932,7 @@ vxn_startl(struct ifnet *ifp)
       VMXNET_INC(dd->txDriverNext, dd->txRingLength);
       dd->txNumDeferred++;
       sc->vxn_tx_pending++;
+      ifp->if_opackets++;
    }
 
    /*
index f371b94d2eb5aef2eee6fe5049d91576393a4a8f..0f7c1eb8e0fa5c4eeb2b055e76dcbd889606d98c 100644 (file)
@@ -108,10 +108,6 @@ typedef struct Vmxnet2_RxRingEntry {
 #define VMXNET2_RX_WITH_FRAG   0x02
 #define VMXNET2_RX_FRAG_EOP    0x04
 
-#ifdef BPF_SUPPORT_ENABLED
-#define VMXNET2_RX_BPF_TRAILER 0x08
-#endif /* BPF_SUPPORT_ENABLED */
-
 typedef struct Vmxnet2_TxRingEntry {
    uint16              flags;          /* Flags as defined below. */
    uint16              ownership;      /* Who owns this packet. */
index b2747969829a108341e8e86899b072615c390468..ab09165f759ea90e5728250bb9d20ed893e6f44b 100644 (file)
@@ -97,7 +97,7 @@
 /*
  * An invalid ring index.
  */
-#define VMXNET_INVALID_RING_INDEX      -1
+#define VMXNET_INVALID_RING_INDEX      (-1)
 
 /*
  * Features that are implemented by the driver.  These are driver
 #define VMXNET_FEATURE_TSO                      0x02
 #define VMXNET_FEATURE_JUMBO_FRAME              0x04
 #define VMXNET_FEATURE_LPD                      0x08
-#define VMXNET_FEATURE_BPF                      0x10
 
 /*
  * Define the set of capabilities required by each feature above
 #define VMXNET_FEATURE_ZERO_COPY_TX_CAPS        VMXNET_CAP_SG
 #define VMXNET_FEATURE_TSO_CAPS                 VMXNET_CAP_TSO
 #define VMXNET_HIGHEST_FEATURE_BIT              VMXNET_FEATURE_TSO
-#define VMXNET_FEATURE_BPF_CAPS                 VMNET_CAP_BPF
 
 #define VMXNET_INC(val, max)     \
    val++;                        \
index 41b969b875b2e00fcee847b5b5b52f246616abf3..c5399a86d2dd9f6d132b888ce3a55bf1ce8a6a6d 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index 7408200738968e8c2e0a32ef87acfbf1c22e4bfa..eaeb44f0e862086d1a3771c7274f18e45370d07f 100644 (file)
@@ -47,13 +47,13 @@ typedef atomic_t os_atomic_t;
 typedef struct file * os_blocker_id_t;
 
 #define OS_UNKNOWN_BLOCKER              NULL
-#define OS_ENOMEM                       -ENOMEM
-#define OS_ENOENT                       -ENOENT
-#define OS_EEXIST                       -EEXIST
+#define OS_ENOMEM                       (-ENOMEM)
+#define OS_ENOENT                       (-ENOENT)
+#define OS_EEXIST                       (-EEXIST)
 #define OS_PATH_MAX                     PATH_MAX
 
 #define OS_FMTTID                       "d"
-#define os_threadid                     current->pid
+#define os_threadid                     (current->pid)
 /*
  * XXX vprintk() wasn't exported until 2.6.9; we should do something more
  * intelligent here eventually.
index 02bbbf2a337e41cc56ff23ae05077c41aedb3a5f..bf40f6f76b48d699e1b490abec28212e10671180 100644 (file)
 #include "includeCheck.h"
 #include "vm_assert.h"
 
+/*
+ * Maximum number of pages to transfer to/from the HGFS server for V3 protocol
+ * operations that support large requests/replies, e.g. reads and writes.
+ */
+#define HGFS_LARGE_IO_MAX_PAGES  15
 
 /*
  * Maximum allowed packet size in bytes. All hgfs code should be made
  */
 #define HGFS_PACKET_MAX 6144
 
+/*
+ * The HGFS_LARGE_PACKET_MAX size is used to allow guests to make
+ * read / write requests of sizes larger than HGFS_PACKET_MAX. The larger size
+ * can only be used with server operations that are specified to be large packet
+ * capable in hgfsProto.h.
+ */
+#define HGFS_LARGE_PACKET_MAX ((4096 * HGFS_LARGE_IO_MAX_PAGES) + 2048)
+
+/* Maximum number of bytes to read or write to a hgfs server in a single packet. */
+#define HGFS_IO_MAX 4096
+
+/* Maximum number of bytes to read or write to a V3 server in a single hgfs packet. */
+#define HGFS_LARGE_IO_MAX (HGFS_LARGE_IO_MAX_PAGES * 4096)
 
 /*
  * Open mode
@@ -113,8 +131,8 @@ typedef enum {
  * error codes travelled from hgfsProto.h to hgfs.h in that same change. Worse,
  * we GA'ed a product (Server 1.0) this way.
  *
- * XXX: I've reversed the order because otherwise new HGFS clients working 
- * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR 
+ * XXX: I've reversed the order because otherwise new HGFS clients working
+ * against WS55-era HGFS servers will think they got HGFS_STATUS_GENERIC_ERROR
  * when the server sent them HGFS_STATUS_INVALID_NAME. This was a problem
  * the Linux client converts HGFS_STATUS_GENERIC_ERROR to -EIO, which causes
  * HgfsLookup to fail unexpectedly (normally HGFS_STATUS_INVALID_NAME is
@@ -136,6 +154,7 @@ typedef enum {
    HGFS_STATUS_NO_SPACE,
    HGFS_STATUS_OPERATION_NOT_SUPPORTED,
    HGFS_STATUS_NAME_TOO_LONG,
+   HGFS_STATUS_INVALID_PARAMETER,
 } HgfsStatus;
 
 /*
@@ -150,9 +169,9 @@ typedef enum {
  * the command and the space into some buffer that is then sent over the
  * backdoor.
  *
- * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest 
- * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates 
- * back to when the host was to send raw TCL code to the guest (TCL Out == 
+ * In Host --> Guest RPC traffic, the host endpoint is TCLO and the guest
+ * endpoint is RpcIn. TCLO is a particularly confusing name choice which dates
+ * back to when the host was to send raw TCL code to the guest (TCL Out ==
  * TCLO).
  *
  * In Guest --> Host RPC traffic, the guest endpoint is RpcOut and the host
@@ -161,11 +180,11 @@ typedef enum {
 
 /*
  * When an RPCI listener registers for this command, HGFS requests are expected
- * to be synchronously sent from the guest and replies are expected to be 
+ * to be synchronously sent from the guest and replies are expected to be
  * synchronously returned.
- * 
- * When an RpcIn listener registers for this command, requests are expected to 
- * be asynchronously sent from the host and synchronously returned from the 
+ *
+ * When an RpcIn listener registers for this command, requests are expected to
+ * be asynchronously sent from the host and synchronously returned from the
  * guest.
  *
  * In short, an endpoint sending this command is sending a request whose reply
@@ -175,7 +194,7 @@ typedef enum {
 #define HGFS_SYNC_REQREP_CLIENT_CMD HGFS_SYNC_REQREP_CMD " "
 #define HGFS_SYNC_REQREP_CLIENT_CMD_LEN (sizeof HGFS_SYNC_REQREP_CLIENT_CMD - 1)
 
-/* 
+/*
  * This is just for the sake of macro naming. Since we are guaranteed
  * equal command lengths, defining command length via a generalized macro name
  * will prevent confusion.
index fa2fefc304a22f666d2dca061281578d5284dfca..85bc08074c3d3c37cdcdac38b9e1ff5ca14cf27b 100644 (file)
 /*
  *-----------------------------------------------------------------------------
  *
- * HgfsBd_GetBuf --
+ * HgfsBdGetBufInt --
  *
- *    Get a buffer to send hgfs requests in.
+ *    Allocates a buffer to send a hgfs request in. This can be either a
+ *    HGFS_PACKET_MAX or HGFS_LARGE_PACKET_MAX size buffer depending on the
+ *    external funciton called.
  *
  * Results:
  *    Pointer to a buffer that has the correct backdoor command prefix for 
  *    NULL on failure (not enough memory).
  *
  * Side effects:
- *    None
+ *    None.
  *
  *-----------------------------------------------------------------------------
  */
 
-char *
-HgfsBd_GetBuf(void)
+static char *
+HgfsBdGetBufInt(size_t bufSize)
 {
    /* 
     * Allocate a buffer that is large enough for an HGFS packet and the 
     * synchronous HGFS command, write the command, and return a pointer that 
     * points into the buffer, after the command.
     */
-   size_t len = HGFS_PACKET_MAX + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
+   size_t len = bufSize + HGFS_SYNC_REQREP_CLIENT_CMD_LEN;
    char *buf = (char*) calloc(sizeof(char), len);
 
    if (!buf) {
@@ -79,6 +81,51 @@ HgfsBd_GetBuf(void)
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetBuf --
+ *
+ *    Get a buffer of size HGFS_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_PACKET_MAX);
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsBd_GetLargeBuf --
+ *
+ *    Get a buffer of size HGFS_LARGE_PACKET_MAX to send hgfs requests in.
+ *
+ * Results:
+ *    See HgfsBdGetBufInt.
+ *
+ * Side effects:
+ *    Allocates memory that must be freed with a call to HgfsBd_PutBuf.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+HgfsBd_GetLargeBuf(void)
+{
+   return HgfsBdGetBufInt(HGFS_LARGE_PACKET_MAX);
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -215,7 +262,7 @@ HgfsBd_Dispatch(RpcOut *out,            // IN: Channel to send on
       return -1;
    }
 
-   ASSERT(replyLen <= HGFS_PACKET_MAX);
+   ASSERT(replyLen <= HGFS_LARGE_PACKET_MAX);
    *packetOut = reply;
    *packetSize = replyLen;
 
index 10ccec0c1366e37d3763c2053c4bd80986356b39..39ab8e7fa6faeb51d53bf35e2d3f1e6585e1eb81 100644 (file)
@@ -29,6 +29,8 @@
 
 char *HgfsBd_GetBuf(void);
 
+char *HgfsBd_GetLargeBuf(void);
+
 void HgfsBd_PutBuf(char *);
 
 RpcOut *HgfsBd_GetChannel(void);
index 66cd10036326735177609e7eae6614f083b7cea1..136602d6ac5d3ffd08f853299e7be4c09468cb44 100644 (file)
@@ -660,7 +660,10 @@ struct HgfsReplyRead {
 HgfsReplyRead;
 
 
-/* Version 3 of HgfsReplyOpen */
+/*
+ * Version 3 of HgfsRequestRead.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
 
 typedef
 #include "vmware_pack_begin.h"
@@ -711,6 +714,11 @@ struct HgfsReplyWrite {
 #include "vmware_pack_end.h"
 HgfsReplyWrite;
 
+/*
+ * Version 3 of HgfsRequestWrite.
+ * Server must support HGFS_LARGE_PACKET_MAX to implement this op.
+ */
+
 typedef
 #include "vmware_pack_begin.h"
 struct HgfsRequestWriteV3 {
index 6b259f43b80b464e8fcbf8da20fd4e1a6f39f6fd..0f85b57c552a9510dac126e0b3174fbf6049322d 100644 (file)
@@ -142,7 +142,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
  *
  * Results:
  *    0       on success
- *    nonzero if time is not representable on UNIX 
+ *    nonzero if time is not representable on UNIX
  *
  * Side effects:
  *    None
@@ -156,7 +156,7 @@ HgfsConvertFromNtTime(time_t *unixTime, // OUT: Time in UNIX format
 {
    struct timespec tm;
    int ret;
-   
+
    ret = HgfsConvertFromNtTimeNsec(&tm, ntTime);
    *unixTime = tm.tv_sec;
    return ret;
@@ -215,6 +215,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_NO_SPACE;
    case ERROR_NOT_SUPPORTED:
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
+   case ERROR_INVALID_PARAMETER:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
@@ -253,6 +255,8 @@ HgfsConvertFromInternalStatus(HgfsInternalStatus status) // IN
       return HGFS_STATUS_OPERATION_NOT_SUPPORTED;
    case ENAMETOOLONG:
       return HGFS_STATUS_NAME_TOO_LONG;
+   case EPARAMETERNOTSUPPORTED:
+      return HGFS_STATUS_INVALID_PARAMETER;
    case HGFS_INTERNAL_STATUS_ERROR:
    default:
       return HGFS_STATUS_GENERIC_ERROR;
index 1b98bf76147c5f87d2e68bc3a3a3b9970f2b16ac..025b415722ee725fd26970e766539d91560bc8ae 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
  * hgfsUtil.h --
- * 
+ *
  *    Utility functions and macros used by hgfs.
  */
 
 
 #   if defined(__linux__) && defined(__KERNEL__)
 #      include "driver-config.h"
-#      include <linux/time.h> // for time_t and timespec  
+#      include <linux/time.h> // for time_t and timespec
     /* Include time.h in userspace code, but not in Solaris kernel code. */
 #   elif defined(__FreeBSD__) && defined(_KERNEL)
     /* Do nothing. */
 #   elif defined(__APPLE__) && defined(KERNEL)
 #      include <sys/time.h>
-#   else 
+#   else
 #      include <time.h>
-#   endif 
+#   endif
 #   include "vm_basic_types.h"
 #   if !defined(_STRUCT_TIMESPEC) &&   \
        !defined(_TIMESPEC_DECLARED) && \
@@ -71,15 +71,27 @@ struct timespec {
     typedef DWORD HgfsInternalStatus;
 #endif
 
-/* 
- * Unfortunately, we need a catch-all "generic error" to use with 
+/*
+ * Unfortunately, we need a catch-all "generic error" to use with
  * HgfsInternalStatus, because there are times when cross-platform code needs
- * to return its own errors along with errors from platform specific code. 
+ * to return its own errors along with errors from platform specific code.
  *
  * Using -1 should be safe because we expect our platforms to use zero as
  * success and a positive range of numbers as error values.
  */
-#define HGFS_INTERNAL_STATUS_ERROR -1
+#define HGFS_INTERNAL_STATUS_ERROR (-1)
+
+#ifndef _WIN32
+/*
+ * This error code is used to notify the client that some of the parameters passed
+ * (e.g. file handles) are not supported. Clients are expected to correct
+ * the parameter (e.g. pass file name instead) and retry.
+ *
+ * Note that this error code is artificially made up and in future may conflict
+ * with an "official" error code when added.
+ */
+#define EPARAMETERNOTSUPPORTED  (MAX_INT32 - 1)
+#endif
 
 /*
  * FreeBSD (pre-6.0) does not define EPROTO, so we'll define our own error code.
index 8cc1227f2194d7bbff7b45c1fedc7520eb1635e0..8d2016062289aa26e7bd8bfda0a1b7326bd6ad5f 100644 (file)
 #include "vm_assert.h"
 #include "vm_basic_types.h"
 
-/*
- * Max amount of read/write data per server request. Must be smaller than
- * HGFS_PACKET_MAX by a large enough margin to allow for headers and
- * other request fields.
- */
-#define HGFS_IO_MAX 4096
-
 /* Private functions. */
 static int HgfsDoWrite(HgfsHandle handle,
                        const char *buf,
index 4f8213b032d0d7a9304d9bc0a565afc5344e54ec..c6c9b9e3976e85d1df1fd031ffaf0ec30b60e8e8 100644 (file)
@@ -303,42 +303,42 @@ Mul64x3264(uint64 multiplicand, uint32 multiplier, uint32 shift)
     * smart enough, at least in the version we are currently using.
     */
    if (shift < 32) {
-      asm("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
-          "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
-          "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
-          "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
-          "shrdl %1, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // use in shrdl requires it to be a register
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%eax, %2     \n\t" // Save lo(multiplicand) in tmp2
+              "mov   %%edx, %%eax  \n\t" // Get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "xchg  %%eax, %2     \n\t" // Save lo(p2) in tmp2, get lo(multiplicand)
+              "mov   %%edx, %1     \n\t" // Save hi(p2) in tmp1
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "addl  %2, %%edx     \n\t" // hi(p1) += lo(p2)
+              "adcl  $0, %1        \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = hi(p2):hi(p1):lo(p1) >> shift
+              "shrdl %1, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // use in shrdl requires it to be a register
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    } else {
-      asm("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
-          "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
-          "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
-          "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
-          "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
-          "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
-          "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
-          "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
-          "shrl  %%cl, %%edx"
-          : "=A"  (result),
-            "=&r" (tmp1),            // could be "=&rm" but "m" is slower
-            "=&r" (tmp2)             // could be "=&rm" but "m" is slower
-          : "0"   (multiplicand),
-            "rm"  (multiplier),
-            "c"   (shift)
-          : "cc"
-      );
+      __asm__("mov   %%edx, %2     \n\t" // Save hi(multiplicand) in tmp2
+              "mull  %4            \n\t" // p1 = lo(multiplicand) * multiplier
+              "mov   %%edx, %1     \n\t" // Save hi(p1) in tmp1
+              "mov   %2, %%eax     \n\t" // Discard lo(p1), get hi(multiplicand)
+              "mull  %4            \n\t" // p2 = hi(multiplicand) * multiplier
+              "addl  %1, %%eax     \n\t" // lo(p2) += hi(p1)
+              "adcl  $0, %%edx     \n\t" // hi(p2) += carry from previous step
+              "shrdl %%edx, %%eax  \n\t" // result = p2 >> (shift & 31)
+              "shrl  %%cl, %%edx"
+              : "=A"  (result),
+                "=&r" (tmp1),            // could be "=&rm" but "m" is slower
+                "=&r" (tmp2)             // could be "=&rm" but "m" is slower
+              : "0"   (multiplicand),
+                "rm"  (multiplier),
+                "c"   (shift)
+              : "cc"
+         );
    }
    return result;
 }
@@ -415,38 +415,38 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result;
    uint32 tmp1, tmp2;
    // ASSERT(shift >= 0 && shift < 64);
-  
+
    /* Written and tested by mann, checked by dbudko and hpreg */
    /* XXX hpreg suggested some improvements that we haven't converged on yet */
-   asm("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
-       "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
-       "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
-       "jl    0f\n\t"             // Go if negative
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "jmp   1f\n"
-    "0:\n\t"
-       "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
-       "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
-    "1:\n\t"
-       "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
-       "mov   %%edx, %1\n\t"      // Save hi(p2)
-       "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
-       "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
-       "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
-       "cmpl  $32, %%ecx\n\t"     // shift < 32?
-       "jl    2f\n\t"             // Go if so
-       "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
-       "mov   %1, %%edx\n\t"
-       "shrdl %%edx, %%eax\n\t"
-       "sarl  %%cl, %%edx\n\t"
-       "jmp   3f\n"
-    "2:\n\t"
-       "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
-       "shrdl %1, %%edx\n"
-    "3:\n\t"
-       : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
-       : "0" (multiplicand), "rm" (multiplier), "c" (shift)
-       : "cc");
+   __asm__("mov   %%eax, %2\n\t"      // Save lo(multiplicand)
+           "mov   %%edx, %%eax\n\t"   // Get hi(multiplicand)
+           "test  %%eax, %%eax\n\t"   // Check sign of multiplicand
+           "jl    0f\n\t"             // Go if negative
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "jmp   1f\n"
+        "0:\n\t"
+           "mull  %4\n\t"             // p2 = hi(multiplicand) * multiplier
+           "sub   %4, %%edx\n"        // hi(p2) += -1 * multiplier
+        "1:\n\t"
+           "xchg  %%eax, %2\n\t"      // Save lo(p2), get lo(multiplicand)
+           "mov   %%edx, %1\n\t"      // Save hi(p2)
+           "mull  %4\n\t"             // p1 = lo(multiplicand) * multiplier
+           "addl  %2, %%edx\n\t"      // hi(p1) += lo(p2)
+           "adcl  $0, %1\n\t"         // hi(p2) += carry from previous step
+           "cmpl  $32, %%ecx\n\t"     // shift < 32?
+           "jl    2f\n\t"             // Go if so
+           "mov   %%edx, %%eax\n\t"   // result = hi(p2):hi(p1) >> (shift & 31)
+           "mov   %1, %%edx\n\t"
+           "shrdl %%edx, %%eax\n\t"
+           "sarl  %%cl, %%edx\n\t"
+           "jmp   3f\n"
+        "2:\n\t"
+           "shrdl %%edx, %%eax\n\t"   // result = hi(p2):hi(p1):lo(p1) >> shift
+           "shrdl %1, %%edx\n"
+        "3:\n\t"
+           : "=A" (result), "=&r" (tmp1), "=&r" (tmp2)
+           : "0" (multiplicand), "rm" (multiplier), "c" (shift)
+           : "cc");
    return result;
 }
 
index 26c2ca7f0f26e0922cafa9973d445bf309ad79fe..054660eda55cacc8f6529b72c6e6c1f36b4cfe77 100644 (file)
@@ -162,14 +162,14 @@ Mul64x3264(uint64 multiplicand,
    uint64 result, dummy;
    const uint64 multiplier64 = multiplier;
 
-   asm("mulq    %3      \n\t"
-       "shrdq   %1, %0  \n\t"
-       : "=a" (result),
-         "=d" (dummy)
-       : "0"  (multiplier64),
-         "rm" (multiplicand),
+   __asm__("mulq    %3      \n\t"
+           "shrdq   %1, %0  \n\t"
+           : "=a" (result),
+             "=d" (dummy)
+           : "0"  (multiplier64),
+             "rm" (multiplicand),
          "c"  (shift)
-       : "cc");
+           : "cc");
    return result;
 }
 
@@ -221,7 +221,7 @@ Muls64x32s64(int64 multiplicand, uint32 multiplier, uint32 shift)
    int64 result, dummy;
    const int64 multiplier64 = multiplier;
 
-   asm("imulq   %3      \n\t"
+   __asm__("imulq   %3      \n\t"
        "shrdq   %1, %0  \n\t"
        : "=a" (result),
          "=d" (dummy)
index 41b969b875b2e00fcee847b5b5b52f246616abf3..c5399a86d2dd9f6d132b888ce3a55bf1ce8a6a6d 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index ef07e636ef3b60bedcb732cf8b5e12f70b0d6606..8cf44e4d567efc365dd1137c46016b58fef52bfd 100644 (file)
@@ -54,17 +54,36 @@ typedef union CPUIDRegsUnion {
 } CPUIDRegsUnion;
 
 /*
- * Results of calling cpuid(eaxArg, ecxArg) on all logical processors. 
+ * Results of calling cpuid(eax, ecx) on all host logical CPU.
  */
 #ifdef _MSC_VER
 #pragma warning (disable :4200) // non-std extension: zero-sized array in struct
 #endif
 
-typedef struct CPUIDResult {
-   uint32 numLogicalCPUs;
-   uint32 eaxArg, ecxArg;
-   CPUIDRegs regs[0];
-} CPUIDResult;
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDReply {
+   /*
+    * Unique host logical CPU identifier. It does not change across queries, so
+    * we use it to correlate the replies of multiple queries.
+    */
+   uint64 tag;                // OUT
+
+   CPUIDRegs regs;            // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDReply;
+
+typedef
+#include "vmware_pack_begin.h"
+struct CPUIDQuery {
+   uint32 eax;                // IN
+   uint32 ecx;                // IN
+   uint32 numLogicalCPUs;     // IN/OUT
+   CPUIDReply logicalCPUs[0]; // OUT
+}
+#include "vmware_pack_end.h"
+CPUIDQuery;
 
 /*
  * CPUID levels the monitor caches and ones that are not cached, but
@@ -315,10 +334,10 @@ FLAGDEF(   6, ECX, INTEL,   0,  1, HW_COORD_FEEDBACK,   IGNORE,  0, FALSE)
 
 /*    LEVEL, REG, VENDOR, POS, SIZE, NAME,   MASK TYPE, SET TO, CPL3, [FUNC] */
 #define CPUID_FIELD_DATA_LEVEL_A                                               \
-FIELDDEF(  A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,   0,  8, PMC_VERSION,         IGNORE,  0, FALSE, PMC_VERSION) \
 FIELDDEFA( A, EAX, INTEL,   8,  8, NUM_PMCS,            IGNORE,  0, FALSE, NUM_PMCS)  \
 FIELDDEF(  A, EAX, INTEL,  16,  8, PMC_BIT_WIDTH,       IGNORE,  0, FALSE)            \
-FIELDDEF(  A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE)            \
+FIELDDEFA( A, EAX, INTEL,  24,  8, PMC_EBX_LENGTH,      IGNORE,  0, FALSE, PMC_EBX_LENGTH) \
 FLAGDEF(   A, EBX, INTEL,   0,  1, PMC_CORE_CYCLE,      IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   1,  1, PMC_INSTR_RETIRED,   IGNORE,  0, FALSE)            \
 FLAGDEF(   A, EBX, INTEL,   2,  1, PMC_REF_CYCLES,      IGNORE,  0, FALSE)            \
@@ -458,7 +477,11 @@ FIELDDEF( 8A, EDX, AMD,     4, 28, SVMEDX_RSVD,         MASK,    0, FALSE)
                       CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FIELDDEFA(lvl, reg, vend, bitpos, size, name, m, v, c3, f)      \
-         FIELDDEF(lvl, reg, vend, bitpos, size, name, m, v, c3)
+   CPUID_##vend##_ID##lvl##reg##_##name##_SHIFT = bitpos,               \
+   CPUID_##vend##_ID##lvl##reg##_##name##_MASK  =                       \
+                      VMW_BIT_MASK(size) << bitpos,                     \
+   CPUID_FEATURE_##vend##_ID##lvl##reg##_##name =                       \
+                      CPUID_##vend##_ID##lvl##reg##_##name##_MASK,
 
 #define FLAGDEFA FIELDDEFA
 #define FLAGDEF FIELDDEF
@@ -796,6 +819,33 @@ CPUID_RequiresFence(CpuidVendors vendor, // IN
 }
 
 
+/*
+ *----------------------------------------------------------------------
+ *
+ * CPUID_CountsCPUIDAsBranch --
+ *
+ *      Returns TRUE iff the cpuid given counts CPUID as a branch
+ *      (i.e. is a pre-Merom E CPU).
+ *
+ *----------------------------------------------------------------------
+ */
+
+static INLINE Bool
+CPUID_CountsCPUIDAsBranch(uint32 v) /* %eax from CPUID with %eax=1 */
+{
+   /* 
+    * CPUID no longer a branch starting with Merom E. Bug 148411.
+    * Penryn (Extended Model: 1) also has this fixed.
+    *
+    * Merom E is: CPUID.1.eax & 0xfff = 0x6f9
+    */
+   return !(CPUID_FAMILY_IS_P6(v) &&
+            (CPUID_EFFECTIVE_MODEL(v) > CPUID_MODEL_CORE2 ||
+             (CPUID_EFFECTIVE_MODEL(v) == CPUID_MODEL_CORE2 &&
+              CPUID_STEPPING(v) >= 9)));
+}
+
+
 /* 
  * The following low-level functions compute the number of
  * cores per cpu.  They should be used cautiously because
@@ -828,4 +878,5 @@ CPUID_IsHypervisorLevel(uint32 level, uint32 *offset)
    return (level & 0xffffff00) == 0x40000000;
 }
 
+
 #endif
index 41b969b875b2e00fcee847b5b5b52f246616abf3..c5399a86d2dd9f6d132b888ce3a55bf1ce8a6a6d 100644 (file)
@@ -314,7 +314,22 @@ GetCallerFrameAddr(void)
 #endif // sun
 #endif // __GNUC__
 
-
+/*
+ * Data prefetch was added in gcc 3.1.1
+ * http://www.gnu.org/software/gcc/gcc-3.1/changes.html
+ */
+#ifdef __GNUC__
+#  if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 1) || \
+       (__GNUC__ == 3 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 1))
+#     define PREFETCH_R(var) __builtin_prefetch((var), 0 /* read */, \
+                                                3 /* high temporal locality */)
+#     define PREFETCH_W(var) __builtin_prefetch((var), 1 /* write */, \
+                                                3 /* high temporal locality */)
+#  else
+#     define PREFETCH_R(var) ((void)(var))
+#     define PREFETCH_W(var) ((void)(var))
+#  endif
+#endif /* __GNUC__ */
 
 
 #ifdef USERLEVEL // {
@@ -547,7 +562,7 @@ typedef int pid_t;
 #ifdef _WIN32
 #define VMW_INVALID_HANDLE INVALID_HANDLE_VALUE
 #else
-#define VMW_INVALID_HANDLE -1
+#define VMW_INVALID_HANDLE (-1)
 #endif
 
 /*
index 9c2f3b7f885e0cac7a9af7c07717f22bc3393652..25b8d435e5b6c949bc27ef34ebb2cb9d37d00d9a 100644 (file)
@@ -16,7 +16,7 @@
  *
  *********************************************************/
 
-/* 
+/*
  * vmxnet.c: A virtual network driver for VMware.
  */
 #include "driver-config.h"
@@ -25,7 +25,7 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9)
 #include <linux/moduleparam.h>
 #endif
-   
+
 #include "compat_slab.h"
 #include "compat_spinlock.h"
 #include "compat_pci.h"
 #include "net.h"
 #include "vmxnet_version.h"
 
-#ifdef BPF_SUPPORT_ENABLED
-#include "bpf_meta.h"
-#include "compat_highmem.h"
-#endif
-
 static int vmxnet_debug = 1;
 
-#define VMXNET_WATCHDOG_TIMEOUT (5 * HZ) 
+#define VMXNET_WATCHDOG_TIMEOUT (5 * HZ)
 
 #if defined(CONFIG_NET_POLL_CONTROLLER) || defined(HAVE_POLL_CONTROLLER)
 #define VMW_HAVE_POLL_CONTROLLER
@@ -70,7 +65,7 @@ static int vmxnet_debug = 1;
 static int vmxnet_open(struct net_device *dev);
 static int vmxnet_start_tx(struct sk_buff *skb, struct net_device *dev);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
-static compat_irqreturn_t vmxnet_interrupt(int irq, void *dev_id, 
+static compat_irqreturn_t vmxnet_interrupt(int irq, void *dev_id,
                                           struct pt_regs * regs);
 #else
 static compat_irqreturn_t vmxnet_interrupt(int irq, void *dev_id);
@@ -103,7 +98,7 @@ static int debug = -1;
 #endif
 
 #if defined(MAX_SKB_FRAGS) && ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18) ) && ( LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 0) )
-#define VMXNET_DO_ZERO_COPY 
+#define VMXNET_DO_ZERO_COPY
 #endif
 
 #ifdef VMXNET_DO_ZERO_COPY
@@ -112,11 +107,11 @@ static int debug = -1;
 #include <linux/in.h>
 #include <linux/tcp.h>
 
-/* 
+/*
  * Tx buffer size that we need for copying header
  * max header is: 14(ip) + 4(vlan) + ip (60) + tcp(60) = 138
  * round it up to the power of 2
- */ 
+ */
 #define TX_PKT_HEADER_SIZE      256
 
 /* Constants used for Zero Copy Tx */
@@ -149,7 +144,7 @@ do{\
 
 #if defined(NETIF_F_GSO) /* 2.6.18 and upwards */
 #define VMXNET_SKB_MSS(skb) skb_shinfo(skb)->gso_size
-#else 
+#else
 #define VMXNET_SKB_MSS(skb) skb_shinfo(skb)->tso_size
 #endif
 #endif
@@ -158,7 +153,7 @@ do{\
 
 #ifdef VMXNET_DEBUG
 #define VMXNET_LOG(msg...) printk(KERN_ERR msg)
-#else 
+#else
 #define VMXNET_LOG(msg...)
 #endif // VMXNET_DEBUG
 
@@ -207,6 +202,132 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
 #endif
 
 
+#ifdef SET_ETHTOOL_OPS
+/*
+ *----------------------------------------------------------------------------
+ *
+ * vmxnet_get_settings --
+ *
+ *      Get device-specific settings.
+ *
+ * Results:
+ *      0 on success, errno on failure.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static int
+vmxnet_get_settings(struct net_device *dev,
+                    struct ethtool_cmd *ecmd)
+{
+   ecmd->supported = SUPPORTED_1000baseT_Full | SUPPORTED_TP;
+   ecmd->advertising = ADVERTISED_TP;
+   ecmd->port = PORT_TP;
+   ecmd->transceiver = XCVR_INTERNAL;
+
+   if (netif_carrier_ok(dev)) {
+      ecmd->speed = 1000;
+      ecmd->duplex = DUPLEX_FULL;
+   } else {
+      ecmd->speed = -1;
+      ecmd->duplex = -1;
+   }
+   return 0;
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * vmxnet_get_drvinfo --
+ *
+ *      Ethtool callback to return driver information
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Updates *drvinfo
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static void
+vmxnet_get_drvinfo(struct net_device *dev,
+                   struct ethtool_drvinfo *drvinfo)
+{
+   struct Vmxnet_Private *lp = dev->priv;
+
+   strncpy(drvinfo->driver, vmxnet_driver.name, sizeof(drvinfo->driver));
+   drvinfo->driver[sizeof(drvinfo->driver) - 1] = '\0';
+
+   strncpy(drvinfo->version, VMXNET_DRIVER_VERSION_STRING,
+           sizeof(drvinfo->version));
+   drvinfo->driver[sizeof(drvinfo->version) - 1] = '\0';
+
+   strncpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
+   drvinfo->fw_version[sizeof(drvinfo->fw_version) - 1] = '\0';
+
+   strncpy(drvinfo->bus_info, compat_pci_name(lp->pdev), ETHTOOL_BUSINFO_LEN);
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ *  vmxnet_set_tso --
+ *
+ *    Ethtool handler to set TSO. If the data is non-zero, TSO is
+ *    enabled. Othewrise, it is disabled.
+ *
+ *  Results:
+ *    0 if successful, error code otherwise.
+ *
+ *  Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+#ifdef VMXNET_DO_TSO
+static int
+vmxnet_set_tso(struct net_device *dev, u32 data)
+{
+   if (data) {
+      struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv;
+
+      if (!lp->tso) {
+         return -EINVAL;
+      }
+      dev->features |= NETIF_F_TSO;
+   } else {
+      dev->features &= ~NETIF_F_TSO;
+   }
+   return 0;
+}
+#endif
+
+
+static struct ethtool_ops
+vmxnet_ethtool_ops = {
+   .get_settings        = vmxnet_get_settings,
+   .get_drvinfo         = vmxnet_get_drvinfo,
+   .get_link            = ethtool_op_get_link,
+   .get_sg              = ethtool_op_get_sg,
+   .set_sg              = ethtool_op_set_sg,
+#ifdef VMXNET_DO_TSO
+   .get_tso             = ethtool_op_get_tso,
+   .set_tso             = vmxnet_set_tso,
+#endif
+};
+
+
+#else   /* !defined(SET_ETHTOOL_OPS) */
+
+
 /*
  *----------------------------------------------------------------------------
  *
@@ -295,7 +416,7 @@ vmxnet_get_tso(struct net_device *dev, void *addr)
    value.data = (dev->features & NETIF_F_TSO) ? 1 : 0;
    if (copy_to_user(addr, &value, sizeof(value))) {
        return -EFAULT;
-   } 
+   }
    return 0;
 }
 #endif
@@ -326,7 +447,7 @@ vmxnet_set_tso(struct net_device *dev, void *addr)
    if (copy_from_user(&value, addr, sizeof(value))) {
       return -EFAULT;
    }
-   
+
    if (value.data) {
       struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv;
 
@@ -346,7 +467,7 @@ vmxnet_set_tso(struct net_device *dev, void *addr)
  *----------------------------------------------------------------------------
  *
  *  vmxnet_ethtool_ioctl --
- * 
+ *
  *    Handler for ethtool ioctl calls.
  *
  *  Results:
@@ -378,7 +499,7 @@ vmxnet_ethtool_ioctl(struct net_device *dev, struct ifreq *ifr)
 #endif
 #ifdef VMXNET_DO_TSO
       case ETHTOOL_GTSO:
-         return vmxnet_get_tso(dev, ifr->ifr_data);         
+         return vmxnet_get_tso(dev, ifr->ifr_data);
       case ETHTOOL_STSO:
          return vmxnet_set_tso(dev, ifr->ifr_data);
 #endif
@@ -419,6 +540,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
    printk(KERN_DEBUG" ioctl operation %d not supported\n", cmd);
    return -EOPNOTSUPP;
 }
+#endif /* SET_ETHTOOL_OPS */
 
 
 /*
@@ -771,7 +893,7 @@ vmxnet_probe_device(struct pci_dev             *pdev, // IN: vmxnet PCI device
 
 #ifdef VMXNET_DO_TSO
    if ((lp->capabilities & VMNET_CAP_TSO) &&
-       (lp->capabilities & (VMNET_CAP_IP4_CSUM | VMNET_CAP_HW_CSUM)) && 
+       (lp->capabilities & (VMNET_CAP_IP4_CSUM | VMNET_CAP_HW_CSUM)) &&
        // tso only makes sense if we have hw csum offload
        lp->chainTx && lp->zeroCopyTx &&
        lp->features & VMXNET_FEATURE_TSO) {
@@ -788,16 +910,6 @@ vmxnet_probe_device(struct pci_dev             *pdev, // IN: vmxnet PCI device
 #endif
 #endif
 
-#ifdef BPF_SUPPORT_ENABLED
-    if(lp->capabilities & VMNET_CAP_BPF && 
-       lp->features & VMXNET_FEATURE_BPF) {
-       dev->features |= NETIF_F_BPF;
-       printk(" bpf");
-    }    
-#endif
-
-
-
    printk("\n");
 
    /* determine rx/tx ring sizes */
@@ -829,7 +941,7 @@ vmxnet_probe_device(struct pci_dev             *pdev, // IN: vmxnet PCI device
 
    driverDataSize =
             sizeof(Vmxnet2_DriverData) +
-            (numRxBuffers + numRxBuffers2) * sizeof(Vmxnet2_RxRingEntry) + 
+            (numRxBuffers + numRxBuffers2) * sizeof(Vmxnet2_RxRingEntry) +
             numTxBuffers * sizeof(Vmxnet2_TxRingEntry);
    VMXNET_LOG("vmxnet: numRxBuffers=((%d+%d)*%d) numTxBuffers=(%d*%d) driverDataSize=%d\n",
               numRxBuffers, numRxBuffers2, (uint32)sizeof(Vmxnet2_RxRingEntry),
@@ -890,14 +1002,14 @@ vmxnet_probe_device(struct pci_dev             *pdev, // IN: vmxnet PCI device
 
    if (lp->partialHeaderCopyEnabled) {
       unsigned int txBufferSize;
-      
+
       txBufferSize = numTxBuffers * TX_PKT_HEADER_SIZE;
       lp->txBufferStartRaw = kmalloc(txBufferSize + PAGE_SIZE,
                                      GFP_DMA | GFP_KERNEL);
       if (lp->txBufferStartRaw) {
-         lp->txBufferStart = (char*)((unsigned long)(lp->txBufferStartRaw + PAGE_SIZE - 1) & 
+         lp->txBufferStart = (char*)((unsigned long)(lp->txBufferStartRaw + PAGE_SIZE - 1) &
                                      (unsigned long)~(PAGE_SIZE - 1));
-         lp->dd->txBufferPhysStart = virt_to_phys(lp->txBufferStart); 
+         lp->dd->txBufferPhysStart = virt_to_phys(lp->txBufferStart);
          lp->dd->txBufferPhysLength = txBufferSize;
          lp->dd->txPktMaxSize = TX_PKT_HEADER_SIZE;
       } else {
@@ -927,7 +1039,12 @@ vmxnet_probe_device(struct pci_dev             *pdev, // IN: vmxnet PCI device
 
    /* Do this after ether_setup(), which sets the default value. */
    dev->set_mac_address = &vmxnet_set_mac_address;
+
+#ifdef SET_ETHTOOL_OPS
+   SET_ETHTOOL_OPS(dev, &vmxnet_ethtool_ops);
+#else
    dev->do_ioctl = vmxnet_ioctl;
+#endif
 
    COMPAT_SET_MODULE_OWNER(dev);
    COMPAT_SET_NETDEV_DEV(dev, &pdev->dev);
@@ -1070,7 +1187,7 @@ vmxnet_init_ring(struct net_device *dev)
    dd->rxRingOffset = offset;
    lp->rxRing = (Vmxnet2_RxRingEntry *)((uintptr_t)dd + offset);
    offset += lp->numRxBuffers * sizeof(Vmxnet2_RxRingEntry);
-   
+
    dd->rxRingLength2 = lp->numRxBuffers2;
    dd->rxRingOffset2 = offset;
    lp->rxRing2 = (Vmxnet2_RxRingEntry *)((uintptr_t)dd + offset);
@@ -1081,7 +1198,7 @@ vmxnet_init_ring(struct net_device *dev)
    lp->txRing = (Vmxnet2_TxRingEntry *)((uintptr_t)dd + offset);
    offset += lp->numTxBuffers * sizeof(Vmxnet2_TxRingEntry);
 
-   VMXNET_LOG("vmxnet_init_ring: offset=%"FMT64"d length=%d\n", 
+   VMXNET_LOG("vmxnet_init_ring: offset=%"FMT64"d length=%d\n",
               (uint64)offset, dd->length);
 
    for (i = 0; i < lp->numRxBuffers; i++) {
@@ -1126,13 +1243,13 @@ vmxnet_init_ring(struct net_device *dev)
             return -ENOMEM;
          }
 
-         lp->rxRing2[i].paddr = pci_map_page(pdev, lp->rxPages[i], 0, 
+         lp->rxRing2[i].paddr = pci_map_page(pdev, lp->rxPages[i], 0,
                                              PAGE_SIZE, PCI_DMA_FROMDEVICE);
          lp->rxRing2[i].bufferLength = PAGE_SIZE;
          lp->rxRing2[i].actualLength = 0;
          lp->rxRing2[i].ownership = VMXNET2_OWNERSHIP_NIC_FRAG;
       }
-   } else 
+   } else
 #endif
    {
       // dummy rxRing2 tacked on to the end, with a single unusable entry
@@ -1236,7 +1353,7 @@ vmxnet_open(struct net_device *dev)
  *
  * vmxnet_unmap_buf  --
  *
- *      Unmap the PAs of the tx entry that we pinned for DMA. 
+ *      Unmap the PAs of the tx entry that we pinned for DMA.
  *
  * Results:
  *      None.
@@ -1247,7 +1364,7 @@ vmxnet_open(struct net_device *dev)
  */
 
 void
-vmxnet_unmap_buf(struct sk_buff *skb, 
+vmxnet_unmap_buf(struct sk_buff *skb,
                  struct Vmxnet2_TxBuf *tb,
                  Vmxnet2_TxRingEntry *xre,
                  struct pci_dev *pdev)
@@ -1281,34 +1398,34 @@ vmxnet_unmap_buf(struct sk_buff *skb,
  *
  * vmxnet_map_pkt  --
  *
- *      Map the buffers/pages that we need for DMA and populate the SG. 
+ *      Map the buffers/pages that we need for DMA and populate the SG.
  *
  *      "offset" indicates the position inside the pkt where mapping should start.
  *      "startSgIdx" indicates the first free sg slot of the first tx entry
  *      (pointed to by txDriverNext).
  *
  *      The caller should guarantee the first tx has at least one sg slot
- *      available. The caller should also ensure that enough tx entries are 
- *      available for this pkt. 
- *      
+ *      available. The caller should also ensure that enough tx entries are
+ *      available for this pkt.
+ *
  * Results:
  *      None.
  *
  * Side effects:
- *      1. Ownership of all tx entries used (EXCEPT the 1st one) are updated. 
- *         The only flag set is VMXNET2_TX_MORE if needed. caller is 
+ *      1. Ownership of all tx entries used (EXCEPT the 1st one) are updated.
+ *         The only flag set is VMXNET2_TX_MORE if needed. caller is
  *         responsible to set up other flags after this call returns.
  *      2. lp->dd->numTxPending is updated
  *      3. txBufInfo corresponding to used tx entries (including the 1st one)
  *         are updated
- *      4. txDriverNext is advanced accordingly 
+ *      4. txDriverNext is advanced accordingly
  *
  *-----------------------------------------------------------------------------
  */
 
 void
-vmxnet_map_pkt(struct sk_buff *skb, 
-               int offset, 
+vmxnet_map_pkt(struct sk_buff *skb,
+               int offset,
                struct Vmxnet_Private *lp,
                int startSgIdx)
 {
@@ -1318,7 +1435,7 @@ vmxnet_map_pkt(struct sk_buff *skb,
    Vmxnet2_TxRingEntry *xre;
    struct Vmxnet2_TxBuf *tb;
    dma_addr_t dma;
-  
+
    VMXNET_ASSERT(startSgIdx < VMXNET2_SG_DEFAULT_LENGTH);
 
    lp->numTxPending ++;
@@ -1329,13 +1446,13 @@ vmxnet_map_pkt(struct sk_buff *skb,
       tb->sgForLinear = -1;
       tb->firstSgForFrag = nextSg;
    } else if (offset < skb_headlen(skb)) {
-      /* we need to map some of the non-frag data. */ 
-      dma = pci_map_single(lp->pdev, 
-                           skb->data + offset, 
-                           skb_headlen(skb) - offset, 
+      /* we need to map some of the non-frag data. */
+      dma = pci_map_single(lp->pdev,
+                           skb->data + offset,
+                           skb_headlen(skb) - offset,
                            PCI_DMA_TODEVICE);
       VMXNET_FILL_SG(xre->sg.sg[nextSg], dma, skb_headlen(skb) - offset);
-      VMXNET_LOG("vmxnet_map_pkt: txRing[%u].sg[%d] -> data %p offset %u size %u\n", 
+      VMXNET_LOG("vmxnet_map_pkt: txRing[%u].sg[%d] -> data %p offset %u size %u\n",
                  dd->txDriverNext, nextSg, skb->data, offset, skb_headlen(skb) - offset);
       tb->sgForLinear = nextSg++;
       tb->firstSgForFrag = nextSg;
@@ -1348,8 +1465,8 @@ vmxnet_map_pkt(struct sk_buff *skb,
 
       for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++){
          frag = &skb_shinfo(skb)->frags[nextFrag];
-         
-         // skip those frags that are completely copied 
+
+         // skip those frags that are completely copied
          if (offset >= frag->size){
             offset -= frag->size;
          } else {
@@ -1364,7 +1481,7 @@ vmxnet_map_pkt(struct sk_buff *skb,
                        dd->txDriverNext, nextSg, nextFrag, offset, frag->size - offset);
             nextSg++;
             nextFrag++;
-            
+
             break;
          }
       }
@@ -1373,28 +1490,28 @@ vmxnet_map_pkt(struct sk_buff *skb,
    // map the remaining frags, we might need to use additional tx entries
    for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++) {
       frag = &skb_shinfo(skb)->frags[nextFrag];
-      dma = pci_map_page(lp->pdev, 
+      dma = pci_map_page(lp->pdev,
                          frag->page,
                          frag->page_offset,
                          frag->size,
                          PCI_DMA_TODEVICE);
-      
+
       if (nextSg == VMXNET2_SG_DEFAULT_LENGTH) {
          xre->flags = VMXNET2_TX_MORE;
          xre->sg.length = VMXNET2_SG_DEFAULT_LENGTH;
          tb->skb = skb;
          tb->eop = 0;
-         
-         // move to the next tx entry 
+
+         // move to the next tx entry
          VMXNET_INC(dd->txDriverNext, dd->txRingLength);
          xre = &lp->txRing[dd->txDriverNext];
          tb = &lp->txBufInfo[dd->txDriverNext];
 
          // the new tx entry must be available
-         VMXNET_ASSERT(xre->ownership == VMXNET2_OWNERSHIP_DRIVER && tb->skb == NULL); 
+         VMXNET_ASSERT(xre->ownership == VMXNET2_OWNERSHIP_DRIVER && tb->skb == NULL);
 
-         /* 
-          * we change it even before the sg are populated but this is 
+         /*
+          * we change it even before the sg are populated but this is
           * fine, because the first tx entry's ownership is not
           * changed yet
           */
@@ -1517,17 +1634,17 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
 #ifdef VMXNET_DO_ZERO_COPY
    if (lp->zeroCopyTx) {
       int txEntries, sgCount;
-      unsigned int headerSize;         
-   
+      unsigned int headerSize;
+
       /* conservatively estimate the # of tx entries needed in the worse case */
       sgCount = (lp->partialHeaderCopyEnabled ? 2 : 1) + skb_shinfo(skb)->nr_frags;
       txEntries = (sgCount + VMXNET2_SG_DEFAULT_LENGTH - 1) / VMXNET2_SG_DEFAULT_LENGTH;
 
       if (UNLIKELY(!lp->chainTx && txEntries > 1)) {
-         /* 
+         /*
           * rare case, no tx desc chaining support but the pkt need more than 1
           * tx entry, linearize it
-          */ 
+          */
          if (compat_skb_linearize(skb) != 0) {
             VMXNET_LOG("vmxnet_tx: skb_linearize failed\n");
             compat_dev_kfree_skb(skb, FREE_WRITE);
@@ -1537,7 +1654,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
          txEntries = 1;
       }
 
-      VMXNET_LOG("\n%d(%d) bytes, %d frags, %d tx entries\n", skb->len, 
+      VMXNET_LOG("\n%d(%d) bytes, %d frags, %d tx entries\n", skb->len,
                  skb_headlen(skb), skb_shinfo(skb)->nr_frags, txEntries);
 
       spin_lock_irqsave(&lp->txLock, flags);
@@ -1552,7 +1669,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
          VMXNET_LOG("queue stopped\n");
          return VMXNET_STOP_TRANSMIT;
       }
-    
+
       /* copy protocol headers if needed */
       if (LIKELY(lp->partialHeaderCopyEnabled)) {
          unsigned int pos = dd->txDriverNext * dd->txPktMaxSize;
@@ -1637,7 +1754,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
                }
             }
          }
-             
+
          if (skb_copy_bits(skb, 0, header, headerSize) != 0) {
             compat_dev_kfree_skb(skb, FREE_WRITE);
             spin_unlock_irqrestore(&lp->txLock, flags);
@@ -1679,7 +1796,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
          spin_unlock_irqrestore(&lp->txLock, flags);
          return VMXNET_STOP_TRANSMIT;
       }
-     
+
       lp->numTxPending ++;
 
       xre->sg.sg[0].addrLow = virt_to_bus(skb->data);
@@ -1703,7 +1820,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev)
    if (skb->ip_summed == VM_TX_CHECKSUM_PARTIAL) {
       xre->flags |= VMXNET2_TX_HW_XSUM | VMXNET2_TX_CAN_KEEP;
    } else {
-      xre->flags |= VMXNET2_TX_CAN_KEEP;        
+      xre->flags |= VMXNET2_TX_CAN_KEEP;
    }
    if (lp->numTxPending > dd->txRingLength - 5) {
       xre->flags |= VMXNET2_TX_RING_LOW;
@@ -1811,7 +1928,7 @@ vmxnet_drop_frags(Vmxnet_Private *lp)
  * vmxnet_rx_frags --
  *
  *    get data from the 2nd rx ring and append the frags to the skb. Multiple
- *    rx entries in the 2nd rx ring are processed until the one with 
+ *    rx entries in the 2nd rx ring are processed until the one with
  *    VMXNET2_RX_FRAG_EOP set.
  *
  * Result:
@@ -1840,7 +1957,7 @@ vmxnet_rx_frags(Vmxnet_Private *lp, struct sk_buff *skb)
       rre2 = &lp->rxRing2[dd->rxDriverNext2];
       flags = rre2->flags;
       VMXNET_ASSERT(rre2->ownership == VMXNET2_OWNERSHIP_DRIVER_FRAG);
-      
+
       if (rre2->actualLength > 0) {
          newPage = alloc_page(GFP_ATOMIC);
          if (UNLIKELY(newPage == NULL)) {
@@ -1878,8 +1995,8 @@ vmxnet_rx_frags(Vmxnet_Private *lp, struct sk_buff *skb)
    skb_shinfo(skb)->nr_frags = numFrags;
    skb->len += skb->data_len;
    skb->truesize += skb->data_len;
-   VMXNET_LOG("vmxnet_rx: %dB from rxRing[%d](%dB)+rxRing2[%d, %d)(%dB)\n", 
-              skb->len, dd->rxDriverNext, skb_headlen(skb), 
+   VMXNET_LOG("vmxnet_rx: %dB from rxRing[%d](%dB)+rxRing2[%d, %d)(%dB)\n",
+              skb->len, dd->rxDriverNext, skb_headlen(skb),
               firstFrag, dd->rxDriverNext2, skb->data_len);
    return 0;
 }
@@ -1906,10 +2023,6 @@ vmxnet_rx(struct net_device *dev)
    Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv;
    Vmxnet2_DriverData *dd = lp->dd;
 
-#ifdef BPF_SUPPORT_ENABLED
-   struct BPF_MetaData *meta = NULL;
-#endif
-
    if (!lp->devOpen) {
       return 0;
    }
@@ -1942,7 +2055,7 @@ vmxnet_rx(struct net_device *dev)
 #ifdef VMXNET_DO_ZERO_COPY
          if (rre->flags & VMXNET2_RX_WITH_FRAG) {
             vmxnet_drop_frags(lp);
-         } 
+         }
 #endif
          lp->stats.rx_errors++;
          goto next_pkt;
@@ -1973,7 +2086,7 @@ vmxnet_rx(struct net_device *dev)
           *  is stripped, such frames become ETH_MIN_FRAME_LEN - 4. (PR106153)
           */
          if (skb->len != 0) {
-           printk(KERN_DEBUG "%s: Runt pkt (%d bytes) entry %d!\n", dev->name, 
+           printk(KERN_DEBUG "%s: Runt pkt (%d bytes) entry %d!\n", dev->name,
                    skb->len, dd->rxDriverNext);
          }
         lp->stats.rx_errors++;
@@ -1981,51 +2094,6 @@ vmxnet_rx(struct net_device *dev)
          if (rre->flags & VMXNET2_RX_HW_XSUM_OK) {
             skb->ip_summed = CHECKSUM_UNNECESSARY;
          }
-#ifdef BPF_SUPPORT_ENABLED
-         
-         meta = (struct BPF_MetaData *)skb->cb;
-
-         if(rre->flags & VMXNET2_RX_BPF_TRAILER) {
-            char *vaddr;
-            int numFrags = skb_shinfo(skb)->nr_frags;
-            
-            if (numFrags > 0) {
-
-               /* If fragments are present, the trailer is present in the
-                * last fragement. Map it and remove the trailer 
-                */
-              vaddr = kmap_atomic(skb_shinfo(skb)->frags[numFrags - 1].page,
-                                   KM_USER0);
-               if (vaddr) {
-
-                  memcpy(meta->bpfSnapLens, 
-                         vaddr + skb_shinfo(skb)->frags[numFrags-1].size, 
-                         sizeof meta->bpfSnapLens);
-                  kunmap_atomic((struct page *)vaddr, KM_USER0);
-
-               } else  {
-                  printk(KERN_ERR"Error mapping Last Fragment of Packet\n");
-                  /* Act as if there was no bpf trailer at all*/
-                  meta->controlByte = 0;
-                  goto error;
-               }
-            } else { 
-
-               /* The trailer is present in the linear data array */
-
-               vaddr = (char *)skb->data;
-
-               memcpy(meta->bpfSnapLens, vaddr + skb->len,
-                      sizeof meta->bpfSnapLens);
-            }
-
-            meta->controlByte |= VMXNET_BPF_PROCESSED;
-
-         } else {
-            meta->controlByte = 0;
-         }
-error:
-#endif
 
          skb->dev = dev;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
@@ -2179,7 +2247,7 @@ vmxnet_close(struct net_device *dev)
    spin_lock_irqsave(&lp->txLock, flags);
    if (lp->numTxPending > 0) {
       //Wait absurdly long (2sec) for all the pending packets to be returned.
-      printk(KERN_DEBUG "vmxnet_close: Pending tx = %d\n", lp->numTxPending); 
+      printk(KERN_DEBUG "vmxnet_close: Pending tx = %d\n", lp->numTxPending);
       for (i = 0; i < 200 && lp->numTxPending > 0; i++) {
         outl(VMXNET_CMD_CHECK_TX_DONE, dev->base_addr + VMXNET_COMMAND_ADDR);
         udelay(10000);
@@ -2198,7 +2266,7 @@ vmxnet_close(struct net_device *dev)
       }
    }
    spin_unlock_irqrestore(&lp->txLock, flags);
-   
+
    outl(0, ioaddr + VMXNET_INIT_ADDR);
 
    free_irq(dev->irq, dev);
@@ -2247,7 +2315,7 @@ vmxnet_close(struct net_device *dev)
  *
  *-----------------------------------------------------------------------------
  */
-static int 
+static int
 vmxnet_load_multicast (struct net_device *dev)
 {
     Vmxnet_Private *lp = (Vmxnet_Private *) dev->priv;
@@ -2307,7 +2375,7 @@ vmxnet_load_multicast (struct net_device *dev)
  *
  *-----------------------------------------------------------------------------
  */
-static void 
+static void
 vmxnet_set_multicast_list(struct net_device *dev)
 {
    unsigned int ioaddr = dev->base_addr;
@@ -2334,7 +2402,7 @@ vmxnet_set_multicast_list(struct net_device *dev)
          lp->dd->ifflags |= VMXNET_IFF_MULTICAST;
       }
    }
-   outl(VMXNET_CMD_UPDATE_LADRF, ioaddr + VMXNET_COMMAND_ADDR);               
+   outl(VMXNET_CMD_UPDATE_LADRF, ioaddr + VMXNET_COMMAND_ADDR);
 
    outl(VMXNET_CMD_UPDATE_IFF, ioaddr + VMXNET_COMMAND_ADDR);
 }
index f371b94d2eb5aef2eee6fe5049d91576393a4a8f..0f7c1eb8e0fa5c4eeb2b055e76dcbd889606d98c 100644 (file)
@@ -108,10 +108,6 @@ typedef struct Vmxnet2_RxRingEntry {
 #define VMXNET2_RX_WITH_FRAG   0x02
 #define VMXNET2_RX_FRAG_EOP    0x04
 
-#ifdef BPF_SUPPORT_ENABLED
-#define VMXNET2_RX_BPF_TRAILER 0x08
-#endif /* BPF_SUPPORT_ENABLED */
-
 typedef struct Vmxnet2_TxRingEntry {
    uint16              flags;          /* Flags as defined below. */
    uint16              ownership;      /* Who owns this packet. */
index b2747969829a108341e8e86899b072615c390468..ab09165f759ea90e5728250bb9d20ed893e6f44b 100644 (file)
@@ -97,7 +97,7 @@
 /*
  * An invalid ring index.
  */
-#define VMXNET_INVALID_RING_INDEX      -1
+#define VMXNET_INVALID_RING_INDEX      (-1)
 
 /*
  * Features that are implemented by the driver.  These are driver
 #define VMXNET_FEATURE_TSO                      0x02
 #define VMXNET_FEATURE_JUMBO_FRAME              0x04
 #define VMXNET_FEATURE_LPD                      0x08
-#define VMXNET_FEATURE_BPF                      0x10
 
 /*
  * Define the set of capabilities required by each feature above
 #define VMXNET_FEATURE_ZERO_COPY_TX_CAPS        VMXNET_CAP_SG
 #define VMXNET_FEATURE_TSO_CAPS                 VMXNET_CAP_TSO
 #define VMXNET_HIGHEST_FEATURE_BIT              VMXNET_FEATURE_TSO
-#define VMXNET_FEATURE_BPF_CAPS                 VMNET_CAP_BPF
 
 #define VMXNET_INC(val, max)     \
    val++;                        \
index fc7ed3be8b9c8a5ec386fd7f8be1ce2522b26898..d39dfb150f4b7f666fd766b32d1434fdaf6be596 100644 (file)
@@ -25,8 +25,8 @@
 #ifndef _VMXNET_VERSION_H_
 #define _VMXNET_VERSION_H_
 
-#define VMXNET_DRIVER_VERSION          2.0.1.0
-#define VMXNET_DRIVER_VERSION_COMMAS   2,0,1,0
-#define VMXNET_DRIVER_VERSION_STRING   "2.0.1.0"
+#define VMXNET_DRIVER_VERSION          2.0.1.1
+#define VMXNET_DRIVER_VERSION_COMMAS   2,0,1,1
+#define VMXNET_DRIVER_VERSION_STRING   "2.0.1.1"
 
 #endif /* _VMXNET_VERSION_H_ */
index b8043779f1bd00e2acdb5e072ba293cc75d8d2f4..a5318aa7400cc823ffd78a1be0a16edc596de664 100644 (file)
@@ -121,6 +121,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 9cdc1fb8ee625acbe037ebb5da0af882dfdec2c2..4c9c2a8be37954192a4b8b43fbb191e83d543b21 100644 (file)
@@ -47,13 +47,13 @@ vmware_toolbox_LDADD += ../lib/sync/libSync.a
 vmware_toolbox_LDADD += ../lib/misc/libMisc.a
 vmware_toolbox_LDADD += ../lib/panicDefault/libPanicDefault.a
 vmware_toolbox_LDADD += ../lib/panic/libPanic.a
+vmware_toolbox_LDADD += ../lib/stubs/libStubs.a
 vmware_toolbox_LDADD += -lX11
 vmware_toolbox_LDADD += @GTK_LIBS@
 vmware_toolbox_LDADD += @ICU_LIBS@
 
 vmware_toolbox_SOURCES =
 vmware_toolbox_SOURCES += debugStdio.c
-vmware_toolbox_SOURCES += stub.c
 vmware_toolbox_SOURCES += toolbox-gtk.c
 vmware_toolbox_SOURCES += toolboxAbout.c
 vmware_toolbox_SOURCES += toolboxDevices.c
index 78b3540952741758cbe738738042f8c156b84c68..5e1327a69c024e4924d4d93ff07a6d546cfe91a9 100644 (file)
@@ -61,10 +61,10 @@ CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am_vmware_toolbox_OBJECTS = debugStdio.$(OBJEXT) stub.$(OBJEXT) \
-       toolbox-gtk.$(OBJEXT) toolboxAbout.$(OBJEXT) \
-       toolboxDevices.$(OBJEXT) toolboxOptions.$(OBJEXT) \
-       toolboxScripts.$(OBJEXT) toolboxShrink.$(OBJEXT)
+am_vmware_toolbox_OBJECTS = debugStdio.$(OBJEXT) toolbox-gtk.$(OBJEXT) \
+       toolboxAbout.$(OBJEXT) toolboxDevices.$(OBJEXT) \
+       toolboxOptions.$(OBJEXT) toolboxScripts.$(OBJEXT) \
+       toolboxShrink.$(OBJEXT)
 vmware_toolbox_OBJECTS = $(am_vmware_toolbox_OBJECTS)
 vmware_toolbox_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
@@ -78,7 +78,7 @@ vmware_toolbox_DEPENDENCIES = ../lib/conf/libConf.a \
        ../lib/dict/libDict.a ../lib/message/libMessage.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
        ../lib/misc/libMisc.a ../lib/panicDefault/libPanicDefault.a \
-       ../lib/panic/libPanic.a
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -171,6 +171,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -251,10 +252,11 @@ vmware_toolbox_LDADD = ../lib/conf/libConf.a \
        ../lib/dict/libDict.a ../lib/message/libMessage.a \
        ../lib/unicode/libUnicode.a ../lib/sync/libSync.a \
        ../lib/misc/libMisc.a ../lib/panicDefault/libPanicDefault.a \
-       ../lib/panic/libPanic.a -lX11 @GTK_LIBS@ @ICU_LIBS@
-vmware_toolbox_SOURCES = debugStdio.c stub.c toolbox-gtk.c \
-       toolboxAbout.c toolboxDevices.c toolboxOptions.c \
-       toolboxScripts.c toolboxShrink.c
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a -lX11 \
+       @GTK_LIBS@ @ICU_LIBS@ $(am__empty)
+vmware_toolbox_SOURCES = debugStdio.c toolbox-gtk.c toolboxAbout.c \
+       toolboxDevices.c toolboxOptions.c toolboxScripts.c \
+       toolboxShrink.c
 all: all-am
 
 .SUFFIXES:
@@ -327,7 +329,6 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugStdio.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbox-gtk.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolboxAbout.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolboxDevices.Po@am__quote@
index b1774810323960b797a1ebe0ac8fb328be40b2ab..05dcc7785c1d95e84d633f1348301201720e7b2f 100644 (file)
@@ -167,6 +167,7 @@ void DebugToFile(const char *str) // IN
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
+   char debugFileShadow;
 
    ASSERT(debugFile[0] != 0);
 
@@ -174,8 +175,9 @@ void DebugToFile(const char *str) // IN
 
    fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
+   debugFileShadow = debugFile[0];
+   debugFile[0] = '\0';
    if (fr != FILEIO_SUCCESS) {
-      debugFile[0] = '\0';
       Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
@@ -205,6 +207,7 @@ void DebugToFile(const char *str) // IN
    FileIO_Close(&fd);
 
  done:
+   debugFile[0] = debugFileShadow;
    return;
 #endif // _CONSOLE
 }
index ebf87b98f7455daf76b4e1f6f2c3604fdc831f25..d6ba42f2e5820281fafc53c38c3cd4d002966477 100644 (file)
@@ -105,8 +105,7 @@ void ToolsMain_OpenHelp(const char *help);
 GtkWidget* ToolsMain_Create(void);
 
 
-Bool RpcInResetCB(char const **result, size_t *resultLen, const char *name,
-                  const char *args, size_t argsSize, void *clientData);
+Bool RpcInResetCB(RpcInData *data);
 Bool RpcInSetOptionCB(char const **result, size_t *resultLen, const char *name,
                       const char *args, size_t argsSize, void *clientData);
 Bool RpcInCapRegCB(char const **result, size_t *resultLen, const char *name,
@@ -602,17 +601,11 @@ ToolsMain_Create(void)
  */
 
 Bool
-RpcInResetCB(char const **result,     // OUT
-             size_t *resultLen,       // OUT
-             const char *name,        // IN
-             const char *args,        // IN
-             size_t argsSize,         // Unused
-             void *clientData)        // Unused
+RpcInResetCB(RpcInData *data) // IN/OUT
 {
    Debug("----------toolbox: Received 'reset' from vmware\n");
 
-   return RpcIn_SetRetVals(result, resultLen, "ATR " TOOLS_CTLPANEL_NAME,
-                           TRUE);
+   return RPCIN_SETRETVALS(data, "ATR " TOOLS_CTLPANEL_NAME, TRUE);
 }
 
 
index 522fff68f23082cd22a3b75abf218904ca224b3f..5de341531f44416357a79e4890229c53ffbfb442 100644 (file)
@@ -605,14 +605,18 @@ Scripts_OnBrowse(gpointer btn,  // IN: unused
        S_ISDIR(statBuf.st_mode)) {
       Str_Strcat(path, "/", sizeof path);
    }
-   
-   gtk_file_selection_set_filename(GTK_FILE_SELECTION(scriptsFileDlg), 
+
+   gtk_file_selection_set_filename(GTK_FILE_SELECTION(scriptsFileDlg),
                                    path);
    gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(scriptsFileDlg));
    gtk_widget_set_sensitive(GTK_FILE_SELECTION(scriptsFileDlg)->ok_button, FALSE);
+#ifdef GTK2
+   gtk_file_selection_set_select_multiple(GTK_FILE_SELECTION(scriptsFileDlg), FALSE);
+#else
    gtk_clist_set_selection_mode(GTK_CLIST(GTK_FILE_SELECTION(scriptsFileDlg)->
                                           file_list),
                                 GTK_SELECTION_BROWSE);
+#endif
    gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(scriptsFileDlg)->ok_button),
                        "clicked", (GtkSignalFunc)Scripts_BrowseOnOk, &path);
    gtk_signal_connect(GTK_OBJECT(scriptsFileDlg), "destroy",
index ce0f99da7bb4809677da69203d9b643be5e50871..26374f4a76f54cdcef67bf4b86a4111421b8d0e7 100644 (file)
@@ -28,8 +28,8 @@
 
 #include "toolboxInt.h"
 #include "debug.h"
+#include "guestApp.h"
 #include "wiper.h"
-#include "rpcout.h"
 
 /*
  * Globals
@@ -71,8 +71,6 @@ Shrink_Create(GtkWidget *mainWnd)
    GtkWidget *viewport;
    GtkWidget *ebox;
 
-   char *result;
-   size_t resultLen;
    int i;
    WiperPartition_List *plist;
    WiperPartition *partkb;
@@ -144,9 +142,8 @@ Shrink_Create(GtkWidget *mainWnd)
       gtk_signal_connect(GTK_OBJECT(button), "clicked",
                          GTK_SIGNAL_FUNC(Shrink_OnShrinkClicked), mainWnd);
 
-      if (RpcOut_sendOne(&result, &resultLen, "disk.wiper.enable")) {
-         if (resultLen == 1 && strcmp(result, "1") == 0)
-         {
+      if (GuestApp_IsDiskShrinkCapable()) {
+         if (GuestApp_IsDiskShrinkEnabled()) {
             gtk_widget_set_sensitive(button, TRUE);
             shrinkList = gtk_clist_new(1);
             gtk_widget_show(shrinkList);
@@ -190,12 +187,11 @@ Shrink_Create(GtkWidget *mainWnd)
          gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 
       }
-      free(result);
    }
 
    return shrinktab;
 }
-            
+
 
 /*
  *-----------------------------------------------------------------------------
@@ -242,13 +238,13 @@ Shrink_OnShrinkClicked(GtkButton *btn,     // IN: unused
          } else {
             disks_to_shrink = 0;
             break;
-         }  
+         }
       } while (slist);
 
       if (disks_to_shrink > 0) {
-         if (ToolsMain_YesNoBox("Shrink Disk", 
+         if (ToolsMain_YesNoBox("Shrink Disk",
                                 "Do you want to shrink the disk(s)?\n")) {
-            if (RpcOut_sendOne(NULL, NULL, "disk.shrink")) {
+            if (GuestApp_DiskShrink()) {
                ToolsMain_MsgBox("Information", "The shrink process is complete.");
             }
             gtk_clist_unselect_all(GTK_CLIST(shrinkList));
@@ -280,11 +276,9 @@ Shrink_OnShrinkClicked(GtkButton *btn,     // IN: unused
  *-----------------------------------------------------------------------------
  */
 
-Bool 
+Bool
 Shrink_DoWipe(WiperPartition *part, GtkWidget* mainWnd) // IN: partition to be wiped
 {
-   char *result;
-   size_t resultLen;
    Bool performShrink = FALSE;
    GtkWidget *btn;
    int progress = 0;
@@ -295,12 +289,10 @@ Shrink_DoWipe(WiperPartition *part, GtkWidget* mainWnd) // IN: partition to be w
     * wiping. This obviously isn't atomic, but it should take care of
     * the case where the user takes a snapshot with the toolbox open.
     */
-   if (RpcOut_sendOne(&result, &resultLen, "disk.wiper.enable")) {
-      if (resultLen == 1 && strcmp(result, "1") == 0) {
+   if (GuestApp_IsDiskShrinkEnabled()) {
          performShrink = TRUE;
-      }
    }
-   free(result);
+
    if (!performShrink) {
       ToolsMain_MsgBox("Error", "The Toolbox believes disk shrinking is "
                        "enabled while the host believes it is disabled. "
@@ -347,7 +339,7 @@ Shrink_DoWipe(WiperPartition *part, GtkWidget* mainWnd) // IN: partition to be w
    gtk_widget_show_all(shrinkWipeDlg);
 
 
-   wiper = Wiper_Start(part, 2 << 30);
+   wiper = Wiper_Start(part, MAX_WIPER_FILE_SIZE);
 
    while (progress < 100 && wiper != NULL) {
       err = Wiper_Next(&wiper, &progress);
index 76191b7462920acbf2662f1208603e1c978fca7f..229b1eccf3dc6b3f99f00f27710b1e68161d325f 100644 (file)
@@ -156,6 +156,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
index 48a1238873fef50d14659ef9152c0c2599fa174b..1ba723144ee9a5405e690e615ec49bece5591501 100644 (file)
@@ -20,6 +20,8 @@ bin_PROGRAMS = vmware-user
 AM_CFLAGS =
 AM_CFLAGS += @GTK_CPPFLAGS@
 AM_CFLAGS += @VMWARE_USER_CPPFLAGS@
+AM_CFLAGS += -I$(top_builddir)/include
+AM_CFLAGS += -DRESOLUTION_X11
 
 vmware_user_LDADD =
 vmware_user_LDADD += ../lib/conf/libConf.a
@@ -29,12 +31,14 @@ vmware_user_LDADD += ../lib/file/libFile.a
 vmware_user_LDADD += ../lib/ghIntegrationStub/libghIntegrationStub.a
 vmware_user_LDADD += ../lib/guestApp/libGuestApp.a
 vmware_user_LDADD += ../lib/guestInfo/libGuestInfo.a
+vmware_user_LDADD += ../lib/guestRpc/libGuestRpc.a
 vmware_user_LDADD += ../lib/hgfsServer/libHgfsServer.a
 vmware_user_LDADD += ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a
 vmware_user_LDADD += ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a
 vmware_user_LDADD += ../lib/impersonate/libImpersonate.a
 vmware_user_LDADD += ../lib/netUtil/libNetUtil.a
 vmware_user_LDADD += ../lib/printer/libPrinter.a
+vmware_user_LDADD += ../lib/resolution/libResolution.a
 vmware_user_LDADD += ../lib/rpcIn/libRpcIn.a
 vmware_user_LDADD += ../lib/rpcOut/libRpcOut.a
 vmware_user_LDADD += ../lib/rpcVmx/libRpcVmx.a
@@ -58,6 +62,7 @@ vmware_user_LDADD += ../lib/err/libErr.a
 vmware_user_LDADD += ../lib/foundryMsg/libFoundryMsg.a
 vmware_user_LDADD += ../lib/backdoor/libBackdoor.a
 vmware_user_LDADD += ../lib/dict/libDict.a
+vmware_user_LDADD += ../lib/dynxdr/libDynxdr.a
 vmware_user_LDADD += ../lib/hgfs/libHgfs.a
 vmware_user_LDADD += ../lib/message/libMessage.a
 vmware_user_LDADD += ../lib/unicode/libUnicode.a
@@ -66,6 +71,7 @@ vmware_user_LDADD += ../lib/procMgr/libProcMgr.a
 vmware_user_LDADD += ../lib/auth/libAuth.a
 vmware_user_LDADD += ../lib/panicDefault/libPanicDefault.a
 vmware_user_LDADD += ../lib/panic/libPanic.a
+vmware_user_LDADD += ../lib/stubs/libStubs.a
 vmware_user_LDADD += -lcrypt
 vmware_user_LDADD += @GTK_LIBS@
 vmware_user_LDADD += @VMWARE_USER_LDADD@
@@ -79,10 +85,7 @@ vmware_user_SOURCES += dnd.c
 vmware_user_SOURCES += foreignVMToolsDaemon.c
 vmware_user_SOURCES += foreignVMToolsNetworking.c
 vmware_user_SOURCES += foundryToolsDaemon.c
-vmware_user_SOURCES += libvmwarectrl.c
 vmware_user_SOURCES += pointer.c
-vmware_user_SOURCES += resolution.c
-vmware_user_SOURCES += stub.c
 vmware_user_SOURCES += vmware-user.c
 
 install-exec-hook:
index e0a431eeb886d3ee8ca254ac069779fe357e7d7f..5602c3c1f3eb4bbd62f7cf34293cf02f1d8d619f 100644 (file)
@@ -64,21 +64,22 @@ PROGRAMS = $(bin_PROGRAMS)
 am_vmware_user_OBJECTS = copyPaste.$(OBJEXT) debugStdio.$(OBJEXT) \
        dnd.$(OBJEXT) foreignVMToolsDaemon.$(OBJEXT) \
        foreignVMToolsNetworking.$(OBJEXT) \
-       foundryToolsDaemon.$(OBJEXT) libvmwarectrl.$(OBJEXT) \
-       pointer.$(OBJEXT) resolution.$(OBJEXT) stub.$(OBJEXT) \
+       foundryToolsDaemon.$(OBJEXT) pointer.$(OBJEXT) \
        vmware-user.$(OBJEXT)
 vmware_user_OBJECTS = $(am_vmware_user_OBJECTS)
 vmware_user_DEPENDENCIES = ../lib/conf/libConf.a ../lib/dnd/libDnd.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/ghIntegrationStub/libghIntegrationStub.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
+       ../lib/guestRpc/libGuestRpc.a \
        ../lib/hgfsServer/libHgfsServer.a \
        ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a \
        ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a \
        ../lib/impersonate/libImpersonate.a \
        ../lib/netUtil/libNetUtil.a ../lib/printer/libPrinter.a \
-       ../lib/rpcIn/libRpcIn.a ../lib/rpcOut/libRpcOut.a \
-       ../lib/rpcVmx/libRpcVmx.a ../lib/SLPv2Parser/libSLPv2Parser.a \
+       ../lib/resolution/libResolution.a ../lib/rpcIn/libRpcIn.a \
+       ../lib/rpcOut/libRpcOut.a ../lib/rpcVmx/libRpcVmx.a \
+       ../lib/SLPv2Parser/libSLPv2Parser.a \
        ../lib/socketMgr/libSocketMgr.a ../lib/strUtil/libStrUtil.a \
        ../lib/string/libString.a ../lib/sync/libSync.a \
        ../lib/syncDriver/libSyncDriver.a ../lib/system/libSystem.a \
@@ -87,10 +88,11 @@ vmware_user_DEPENDENCIES = ../lib/conf/libConf.a ../lib/dnd/libDnd.a \
        ../lib/vmSignal/libVmSignal.a ../lib/wiper/libWiper.a \
        ../lib/err/libErr.a ../lib/foundryMsg/libFoundryMsg.a \
        ../lib/backdoor/libBackdoor.a ../lib/dict/libDict.a \
-       ../lib/hgfs/libHgfs.a ../lib/message/libMessage.a \
-       ../lib/unicode/libUnicode.a ../lib/misc/libMisc.a \
-       ../lib/procMgr/libProcMgr.a ../lib/auth/libAuth.a \
-       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a
+       ../lib/dynxdr/libDynxdr.a ../lib/hgfs/libHgfs.a \
+       ../lib/message/libMessage.a ../lib/unicode/libUnicode.a \
+       ../lib/misc/libMisc.a ../lib/procMgr/libProcMgr.a \
+       ../lib/auth/libAuth.a ../lib/panicDefault/libPanicDefault.a \
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -183,6 +185,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -247,7 +250,8 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = @GTK_CPPFLAGS@ @VMWARE_USER_CPPFLAGS@
+AM_CFLAGS = @GTK_CPPFLAGS@ @VMWARE_USER_CPPFLAGS@ \
+       -I$(top_builddir)/include -DRESOLUTION_X11
 # In the absence of the linker options --start-group and --end-group (which
 # can't be put in LDADD), we need to bring the following libraries out of
 # the alphabetical order so their symbols are properly resolved.
@@ -255,13 +259,15 @@ vmware_user_LDADD = ../lib/conf/libConf.a ../lib/dnd/libDnd.a \
        ../lib/eventManager/libEventManager.a ../lib/file/libFile.a \
        ../lib/ghIntegrationStub/libghIntegrationStub.a \
        ../lib/guestApp/libGuestApp.a ../lib/guestInfo/libGuestInfo.a \
+       ../lib/guestRpc/libGuestRpc.a \
        ../lib/hgfsServer/libHgfsServer.a \
        ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.a \
        ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.a \
        ../lib/impersonate/libImpersonate.a \
        ../lib/netUtil/libNetUtil.a ../lib/printer/libPrinter.a \
-       ../lib/rpcIn/libRpcIn.a ../lib/rpcOut/libRpcOut.a \
-       ../lib/rpcVmx/libRpcVmx.a ../lib/SLPv2Parser/libSLPv2Parser.a \
+       ../lib/resolution/libResolution.a ../lib/rpcIn/libRpcIn.a \
+       ../lib/rpcOut/libRpcOut.a ../lib/rpcVmx/libRpcVmx.a \
+       ../lib/SLPv2Parser/libSLPv2Parser.a \
        ../lib/socketMgr/libSocketMgr.a ../lib/strUtil/libStrUtil.a \
        ../lib/string/libString.a ../lib/sync/libSync.a \
        ../lib/syncDriver/libSyncDriver.a ../lib/system/libSystem.a \
@@ -270,16 +276,16 @@ vmware_user_LDADD = ../lib/conf/libConf.a ../lib/dnd/libDnd.a \
        ../lib/vmSignal/libVmSignal.a ../lib/wiper/libWiper.a \
        ../lib/err/libErr.a ../lib/foundryMsg/libFoundryMsg.a \
        ../lib/backdoor/libBackdoor.a ../lib/dict/libDict.a \
-       ../lib/hgfs/libHgfs.a ../lib/message/libMessage.a \
-       ../lib/unicode/libUnicode.a ../lib/misc/libMisc.a \
-       ../lib/procMgr/libProcMgr.a ../lib/auth/libAuth.a \
-       ../lib/panicDefault/libPanicDefault.a ../lib/panic/libPanic.a \
-       -lcrypt @GTK_LIBS@ @VMWARE_USER_LDADD@ @COMMON_XLIBS@ \
-       @ICU_LIBS@ $(am__empty)
+       ../lib/dynxdr/libDynxdr.a ../lib/hgfs/libHgfs.a \
+       ../lib/message/libMessage.a ../lib/unicode/libUnicode.a \
+       ../lib/misc/libMisc.a ../lib/procMgr/libProcMgr.a \
+       ../lib/auth/libAuth.a ../lib/panicDefault/libPanicDefault.a \
+       ../lib/panic/libPanic.a ../lib/stubs/libStubs.a -lcrypt \
+       @GTK_LIBS@ @VMWARE_USER_LDADD@ @COMMON_XLIBS@ @ICU_LIBS@ \
+       $(am__empty)
 vmware_user_SOURCES = copyPaste.c debugStdio.c dnd.c \
        foreignVMToolsDaemon.c foreignVMToolsNetworking.c \
-       foundryToolsDaemon.c libvmwarectrl.c pointer.c resolution.c \
-       stub.c vmware-user.c
+       foundryToolsDaemon.c pointer.c vmware-user.c
 all: all-am
 
 .SUFFIXES:
@@ -357,10 +363,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foreignVMToolsDaemon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foreignVMToolsNetworking.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryToolsDaemon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmwarectrl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pointer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolution.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware-user.Po@am__quote@
 
 .c.o:
index 118560ca1e55d270a0c4d3cc8a571300091aebc9..955494eb669aa74aba1dca280e65562cf6e6c6f8 100644 (file)
@@ -161,6 +161,7 @@ static Bool gIsOwner;
 /*
  * Forward Declarations
  */
+static INLINE void CopyPasteStateInit(void);
 static void CopyPasteSelectionReceivedCB(GtkWidget *widget,
                                          GtkSelectionData *selection_data,
                                          gpointer data);
@@ -209,7 +210,7 @@ struct SelectionTargetList {
  *-----------------------------------------------------------------------------
  */
 
-void 
+void
 CopyPasteSelectionRemoveTarget(GtkWidget *widget,
                                GdkAtom selection,
                                GdkAtom target)
@@ -1868,14 +1869,6 @@ CopyPaste_Register(GtkWidget* mainWnd)
    gtk_signal_connect(GTK_OBJECT(mainWnd), "selection_clear_event",
                       GTK_SIGNAL_FUNC(CopyPasteSelectionClearCB), mainWnd);
 
-   gHostClipboardBuf[0] = '\0';
-   gGuestSelPrimaryBuf[0] = '\0';
-   gGuestSelClipboardBuf[0] = '\0';
-   gIsOwner = FALSE;
-   gGHFCPRpcResultBuffer = NULL;
-   gHGFCPPending = FALSE;
-   gHGFCPFileTransferStatus = FCP_FILE_TRANSFER_NOT_YET;
-
    RpcIn_RegisterCallback(gRpcIn, "copypaste.hg.data.set",
                           CopyPasteRpcInHGSetDataCB, NULL);
    RpcIn_RegisterCallback(gRpcIn, "copypaste.hg.data.finish",
@@ -1887,14 +1880,8 @@ CopyPaste_Register(GtkWidget* mainWnd)
    RpcIn_RegisterCallback(gRpcIn, "copypaste.gh.finish",
                           CopyPasteRpcInGHFinishCB, NULL);
 
-   if (CopyPaste_GetVmxCopyPasteVersion() >= 2) {
-      /*
-       * Create staging directory for file copy/paste. This is for vmx with version 2
-       * or greater.
-       */
-      gFileRootSize = DnD_GetNewFileRoot(gFileRoot, sizeof gFileRoot);
-      Debug("CopyPaste_Register create file root [%s]\n", gFileRoot);
-   }
+   CopyPasteStateInit();
+
    return CopyPaste_RegisterCapability();
 }
 
@@ -1930,6 +1917,37 @@ CopyPaste_Unregister(GtkWidget* mainWnd)
 }
 
 
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPaste_OnReset --
+ *
+ *    Handles reinitializing Copy Paste state on a reset.
+ *
+ * Results:
+ *    None.
+ *
+ * Side effects:
+ *    None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+CopyPaste_OnReset(void)
+{
+   if (gHGFCPFileTransferStatus == FCP_FILE_TRANSFERRING) {
+      File_DeleteDirectoryTree(gFileRoot);
+      if (gBlockFd > 0 && !DnD_RemoveBlock(gBlockFd, gFileRoot)) {
+         Warning("CopyPasteRpcInHGDataFinishCB: Unable to remove block [%s].\n",
+                 gFileRoot);
+      }
+      gFileRootSize = DnD_GetNewFileRoot(gFileRoot, sizeof gFileRoot);
+   }
+
+   CopyPasteStateInit();
+}
+
 /*
  *----------------------------------------------------------------------------
  *
@@ -1975,3 +1993,41 @@ CopyPaste_IsRpcCPSupported(void)
 {
    return gVmxCopyPasteVersion > 1;
 }
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * CopyPasteStateInit --
+ *
+ *    Initalialize CopyPaste State.
+ *
+ * Results:
+ *    None.
+ *
+ * Side effects:
+ *    None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+void
+CopyPasteStateInit(void)
+{
+   gHostClipboardBuf[0] = '\0';
+   gGuestSelPrimaryBuf[0] = '\0';
+   gGuestSelClipboardBuf[0] = '\0';
+   gIsOwner = FALSE;
+   gGHFCPRpcResultBuffer = NULL;
+   gHGFCPPending = FALSE;
+   gHGFCPFileTransferStatus = FCP_FILE_TRANSFER_NOT_YET;
+
+   if (CopyPaste_GetVmxCopyPasteVersion() >= 2) {
+      /*
+       * Create staging directory for file copy/paste. This is for vmx with version 2
+       * or greater.
+       */
+      gFileRootSize = DnD_GetNewFileRoot(gFileRoot, sizeof gFileRoot);
+      Debug("CopyPaste_Register create file root [%s]\n", gFileRoot);
+   }
+}
index b1774810323960b797a1ebe0ac8fb328be40b2ab..05dcc7785c1d95e84d633f1348301201720e7b2f 100644 (file)
@@ -167,6 +167,7 @@ void DebugToFile(const char *str) // IN
    size_t bytesWritten;
    Unicode timePrefix;
    const char *timePrefixUtf8;
+   char debugFileShadow;
 
    ASSERT(debugFile[0] != 0);
 
@@ -174,8 +175,9 @@ void DebugToFile(const char *str) // IN
 
    fr = FileIO_Open(&fd, debugFile, FILEIO_OPEN_ACCESS_WRITE,
                     FILEIO_OPEN_CREATE);
+   debugFileShadow = debugFile[0];
+   debugFile[0] = '\0';
    if (fr != FILEIO_SUCCESS) {
-      debugFile[0] = '\0';
       Warning("---Error opening file '%s'.\n", debugFile);
       goto done;
    }
@@ -205,6 +207,7 @@ void DebugToFile(const char *str) // IN
    FileIO_Close(&fd);
 
  done:
+   debugFile[0] = debugFileShadow;
    return;
 #endif // _CONSOLE
 }
index 0b667089ad25ea8564c0b7e5a3ccf55085709d24..01e1d216d99623f963a1ba41d764363cdc2d28fe 100644 (file)
@@ -283,7 +283,7 @@ static GdkAtom gTargetEntryAtom[NR_GH_DRAG_TARGETS];
 static char gFileRoot[DND_MAX_PATH];
 static size_t gFileRootSize;
 static size_t gDnDDataSize;
-
+static Bool gUnity;
 
 /*
  * From vmwareuserInt.h
@@ -1336,8 +1336,12 @@ DnDGtkDragMotionCB(GtkWidget *widget,    // IN: target widget
    /*
     * We'll get a number of these and should only carry on these operations on
     * the first one.
+    *
+    * XXX Unity mode needs to know if there is a g->h->g dnd operation by
+    * detecting if the mouse has left the detection window. This code is
+    * currently not in the guest and should be ported from the host.
     */
-   if (gGHState.dragInProgress) {
+   if (gGHState.dragInProgress && !gUnity) {
       Debug("DnDGtkDragMotionCB: drag already in progress\n");
       return FALSE;
    }
@@ -1347,7 +1351,7 @@ DnDGtkDragMotionCB(GtkWidget *widget,    // IN: target widget
     * signals after we have already handled them.  Prevent resetting the data
     * and trying to start a new DnD operation.
     */
-   if (!gGHState.ungrabReceived) {
+   if (!gGHState.ungrabReceived && !gUnity) {
       Debug("DnDGtkDragMotionCB: extra drag motion without ungrab\n");
       return FALSE;
    }
@@ -1603,7 +1607,9 @@ DnDGtkDragDropCB(GtkWidget *widget,  // IN: widget event occurred on
    }
 
    /* Hide our window so we don't receive stray signals */
-   gtk_widget_hide(widget);
+   if (!gUnity) {
+      gtk_widget_hide(widget);
+   }
 
    gtk_drag_finish(dc, TRUE, FALSE, time);
 
@@ -2220,7 +2226,9 @@ DnDGHStateInit(GtkWidget *widget)  // IN
    gGHState.ungrabReceived = FALSE;
    gGHState.event = NULL;
    DnDGHXdndClearPending(widget);
-   gtk_widget_hide(widget);
+   if (!gUnity) {
+      gtk_widget_hide(widget);
+   }
 }
 
 
@@ -2268,7 +2276,7 @@ static INLINE Bool
 DnDGHCancel(GtkWidget *widget) // IN: program's widget
 {
    /* Hide our widget so we don't receive stray signals */
-   if (widget) {
+   if (widget && !gUnity) {
       gtk_widget_hide(widget);
    }
 
@@ -2318,7 +2326,7 @@ DnDGHXEventTimeout(void *clientData) // IN: our widget
 
    Debug("DnDGHXEventTimeout time out \n");
 
-   if (!gGHState.dragInProgress) {
+   if (!gGHState.dragInProgress && !gUnity) {
       gtk_widget_hide(widget);
    }
 
@@ -2422,11 +2430,15 @@ DnD_RegisterCapability(void)
  */
 
 Bool
-DnD_Register(GtkWidget *mainWnd) // IN: The widget to register as a drag source.
+DnD_Register(GtkWidget *hgWnd, // IN: The widget to register as a drag source.
+             GtkWidget *ghWnd) // IN: The widget to register as a drag target.
 {
    gDragCtx = NULL;
    uint32 i;
 
+   ASSERT(hgWnd);
+   ASSERT(ghWnd);
+
    if (DnD_GetVmxDnDVersion() < 2) {
       goto error;
    }
@@ -2436,26 +2448,26 @@ DnD_Register(GtkWidget *mainWnd) // IN: The widget to register as a drag source.
     * variable to avoid segfaults.  If we have a reason to check the major and
     * minor numbers of the running extension, that would go here.
     */
-   if (!XTestQueryExtension(GDK_WINDOW_XDISPLAY(mainWnd->window),
+   if (!XTestQueryExtension(GDK_WINDOW_XDISPLAY(hgWnd->window),
                             &i, &i, &i, &i)) {
       goto error;
    }
 
    /* Host->Guest RPC callbacks */
-   RpcIn_RegisterCallback(gRpcIn, "dnd.data.set", DnDRpcInDataSetCB, mainWnd);
-   RpcIn_RegisterCallback(gRpcIn, "dnd.enter", DnDRpcInEnterCB, mainWnd);
-   RpcIn_RegisterCallback(gRpcIn, "dnd.move", DnDRpcInMoveCB, mainWnd);
-   RpcIn_RegisterCallback(gRpcIn, "dnd.drop", DnDRpcInDropCB, mainWnd);
+   RpcIn_RegisterCallback(gRpcIn, "dnd.data.set", DnDRpcInDataSetCB, hgWnd);
+   RpcIn_RegisterCallback(gRpcIn, "dnd.enter", DnDRpcInEnterCB, hgWnd);
+   RpcIn_RegisterCallback(gRpcIn, "dnd.move", DnDRpcInMoveCB, hgWnd);
+   RpcIn_RegisterCallback(gRpcIn, "dnd.drop", DnDRpcInDropCB, hgWnd);
    RpcIn_RegisterCallback(gRpcIn, "dnd.data.finish", DnDRpcInDataFinishCB,
-                          mainWnd);
+                          hgWnd);
 
    /* Guest->Host RPC callbacks */
    RpcIn_RegisterCallback(gRpcIn, "dnd.ungrab",
-                          DnDRpcInMouseUngrabCB, mainWnd);
+                          DnDRpcInMouseUngrabCB, ghWnd);
    RpcIn_RegisterCallback(gRpcIn, "dnd.data.get.file",
-                          DnDRpcInGetNextFileCB, mainWnd);
+                          DnDRpcInGetNextFileCB, ghWnd);
    RpcIn_RegisterCallback(gRpcIn, "dnd.finish",
-                          DnDRpcInFinishCB, mainWnd);
+                          DnDRpcInFinishCB, ghWnd);
 
    /*
     * Setup mainWnd as a DND source/dest.
@@ -2481,16 +2493,16 @@ DnD_Register(GtkWidget *mainWnd) // IN: The widget to register as a drag source.
    }
 
    /* Drag source for Host->Guest */
-   gtk_drag_source_set(mainWnd, GDK_BUTTON1_MASK,
+   gtk_drag_source_set(hgWnd, GDK_BUTTON1_MASK,
                        gTargetEntry, ARRAYSIZE(gTargetEntry),
                        GDK_ACTION_COPY | GDK_ACTION_MOVE);
 
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_begin",
-                      GTK_SIGNAL_FUNC(DnDGtkBeginCB), mainWnd);
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_end",
-                      GTK_SIGNAL_FUNC(DnDGtkEndCB), mainWnd);
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_data_get",
-                      GTK_SIGNAL_FUNC(DnDGtkDataRequestCB), mainWnd);
+   gtk_signal_connect(GTK_OBJECT(hgWnd), "drag_begin",
+                      GTK_SIGNAL_FUNC(DnDGtkBeginCB), hgWnd);
+   gtk_signal_connect(GTK_OBJECT(hgWnd), "drag_end",
+                      GTK_SIGNAL_FUNC(DnDGtkEndCB), hgWnd);
+   gtk_signal_connect(GTK_OBJECT(hgWnd), "drag_data_get",
+                      GTK_SIGNAL_FUNC(DnDGtkDataRequestCB), hgWnd);
 
 
    /*
@@ -2499,21 +2511,20 @@ DnD_Register(GtkWidget *mainWnd) // IN: The widget to register as a drag source.
     * We provide NR_GH_DRAG_TARGETS (rather than ARRAYSIZE(gTargetEntry)) to
     * gtk_drag_dest_set() since we support less targets for G->H than H->G.
     */
-   gtk_drag_dest_set(mainWnd,
+   gtk_drag_dest_set(ghWnd,
                      GTK_DEST_DEFAULT_MOTION,
                      gTargetEntry, NR_GH_DRAG_TARGETS,
                      GDK_ACTION_COPY | GDK_ACTION_MOVE);
 
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_motion",
-                      GTK_SIGNAL_FUNC(DnDGtkDragMotionCB), mainWnd);
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_data_received",
+   gtk_signal_connect(GTK_OBJECT(ghWnd), "drag_motion",
+                      GTK_SIGNAL_FUNC(DnDGtkDragMotionCB), ghWnd);
+   gtk_signal_connect(GTK_OBJECT(ghWnd), "drag_data_received",
                       GTK_SIGNAL_FUNC(DnDGtkDragDataReceivedCB),
-                      mainWnd);
-   gtk_signal_connect(GTK_OBJECT(mainWnd), "drag_drop",
-                      GTK_SIGNAL_FUNC(DnDGtkDragDropCB), mainWnd);
+                      ghWnd);
+   gtk_signal_connect(GTK_OBJECT(ghWnd), "drag_drop",
+                      GTK_SIGNAL_FUNC(DnDGtkDragDropCB), ghWnd);
 
-   DnDHGStateInit();
-   DnDGHStateInit(mainWnd);
+   DnD_OnReset(hgWnd, ghWnd);
 
    if (DnD_RegisterCapability()) {
       return TRUE;
@@ -2523,7 +2534,7 @@ DnD_Register(GtkWidget *mainWnd) // IN: The widget to register as a drag source.
     * We get here if DnD registration fails for some reason
     */
 error:
-   DnD_Unregister(mainWnd);
+   DnD_Unregister(hgWnd, ghWnd);
    return FALSE;
 }
 
@@ -2545,35 +2556,36 @@ error:
  */
 
 void
-DnD_Unregister(GtkWidget *mainWnd) // IN: program's widget
+DnD_Unregister(GtkWidget *hgWnd,        // IN: The widget for hg dnd
+               GtkWidget *ghWnd)        // IN: The widget for gh dnd
 {
    RpcOut_sendOne(NULL, NULL, "dnd.ready disable");
 
    DnDGHFileListClear();
 
    /* Unregister source for Host->Guest DnD. */
-   gtk_drag_source_unset(mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+   gtk_drag_source_unset(hgWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(hgWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkBeginCB),
-                                 mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+                                 hgWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(hgWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkEndCB),
-                                 mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+                                 hgWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(hgWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkDataRequestCB),
-                                 mainWnd);
+                                 hgWnd);
 
    /* Unregister destination for Guest->Host DnD. */
-   gtk_drag_dest_unset(mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+   gtk_drag_dest_unset(ghWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(ghWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkDragMotionCB),
-                                 mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+                                 ghWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(ghWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkDragDataReceivedCB),
-                                 mainWnd);
-   gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd),
+                                 ghWnd);
+   gtk_signal_disconnect_by_func(GTK_OBJECT(ghWnd),
                                  GTK_SIGNAL_FUNC(DnDGtkDragDropCB),
-                                 mainWnd);
+                                 ghWnd);
 }
 
 
@@ -2594,27 +2606,45 @@ DnD_Unregister(GtkWidget *mainWnd) // IN: program's widget
  */
 
 void
-DnD_OnReset(GtkWidget *mainWnd) // IN: program's widget
+DnD_OnReset(GtkWidget *hgWnd,   // IN: The widget for hg dnd
+            GtkWidget *ghWnd)   // IN: The widget for gh dnd
+
 {
    Debug("DnD_OnReset: entry\n");
+
+   /* Cancel file transfer. */
+   if (gHGDnDInProgress || gHGDataPending) {
+      DnD_DeleteStagingFiles(gFileRoot, FALSE);
+      if (gBlockFd >= 0 && !DnD_RemoveBlock(gBlockFd, gFileRoot)) {
+         Warning("DnD_OnReset: could not remove block on %s\n",
+                 gFileRoot);
+      }
+   }
+
    /*
     * If a DnD in either direction was in progress during suspend, send an
     * escape to cancel the operation and reset the pointer state.
     */
-   if (gHGDnDInProgress || gGHState.dragInProgress) {
-      Debug("DnD_OnReset: sending escape\n");
-      DnDSendEscapeKey(mainWnd);
+   if (gHGDnDInProgress) {
+      Debug("DnD_OnReset: sending hgWnd escape\n");
+      DnDSendEscapeKey(hgWnd);
+   }
+
+   if (gGHState.dragInProgress) {
+      Debug("DnD_OnReset: sending ghWnd escape\n");
+      DnDSendEscapeKey(ghWnd);
    }
 
    if (gGHState.dragInProgress) {
       Debug("DnD_OnReset: canceling host->guest DnD\n");
-      DnDGHCancel(mainWnd);
+      DnDGHCancel(ghWnd);
    }
 
    /* Reset DnD state. */
    DnDHGStateInit();
-   DnDGHStateInit(mainWnd);
+   DnDGHStateInit(ghWnd);
    DnDGHFileListClear();
+   DnD_SetMode(FALSE);
 }
 
 
@@ -2639,3 +2669,26 @@ DnD_InProgress(void)
 {
    return gGHState.dragInProgress || gHGDnDInProgress || gHGDataPending;
 }
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * DnD_SetMode --
+ *
+ *      Sets dnd mode to single window or unity mode.
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      Controls if the g->h det window is automatically hidden.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+void
+DnD_SetMode(Bool unity) // IN
+{
+   gUnity = unity;
+}
index 0b2848659c0813444b3aad3af1643e62bf5eb1b9..e32c72facdd3ba5de301100434be6efdcdc4087b 100644 (file)
@@ -48,7 +48,7 @@
 #include "SLPv2Private.h"
 #include "guestInfo.h"
 #include "netutil.h"
-#include "guestInfoInt.h"
+#include "guestInfo.h"
 
 #include "vixOpenSource.h"
 #include "syncEvent.h"
@@ -57,7 +57,6 @@
 #include "foreignVMToolsDaemon.h"
 
 
-
 #ifdef _WIN32
 #define ASOCK_ENOTCONN          WSAENOTCONN
 #define ASOCK_ENOTSOCK          WSAENOTSOCK
@@ -265,7 +264,7 @@ ForeignTools_InitializeNetworking(void)
    char *ipAddressStr = NULL;
    char *destPtr;
    char *endDestPtr;
-   GuestNicInfo nicInfo;
+   GuestNicList nicInfo;
 #ifdef _WIN32
    HMODULE hWs2_32 = NULL;
    WSADATA wsaData;
@@ -414,21 +413,18 @@ ForeignTools_InitializeNetworking(void)
    /*
     * Find out how big the IP_ADAPTER_INFO table needs to be.
     */
-   success = GuestInfoGetNicInfo(&nicInfo);
+   success = GuestInfo_GetNicInfo(&nicInfo);
    if (success) {
-      NicEntry *nicEntryPtr = NULL;
-      DblLnkLst_Links *nicEntryLink;
-
-      DblLnkLst_ForEach(nicEntryLink, &nicInfo.nicList) {
-         nicEntryPtr = DblLnkLst_Container(nicEntryLink, NicEntry, links);
+      u_int i;
+      for (i = 0; i < nicInfo.nics.nics_len; i++) {
+         GuestNic *nic = &nicInfo.nics.nics_val[i];
          destPtr += Str_Snprintf(destPtr,
                                  endDestPtr - destPtr,
                                  "%s=%s;",
                                  VIX_SLPV2_PROPERTY_MAC_ADDR,
-                                 nicEntryPtr->nicEntryProto.macAddress);
+                                 nic->macAddress);
       }
-
-      GuestInfo_FreeDynamicMemoryInNicInfo(&nicInfo);
+      VMX_XDR_FREE(xdr_GuestNicList, &nicInfo);
    }
 
    free(ipAddressStr);
index fc83697efa33fe9e5015ca1c2f87edaaad63f4e9..7d2ccd537d64267cc0e8b4366fa61579016eb2ca 100644 (file)
@@ -65,7 +65,6 @@
 #include "foundryToolsDaemon.h"
 #include "printer.h"
 #include "base64.h"
-#include "guestInfoInt.h"
 #include "syncDriver.h"
 #include "hgfsServer.h"
 #include "hgfs.h"
index 6d3229fe9fb054535aa278c05acb8b91fe81095b..609d442d5fbff37a8b5b810d903ffb7c868758ac 100644 (file)
@@ -56,6 +56,7 @@
 #include "guestApp.h" // for ALLOW_TOOLS_IN_FOREIGN_VM
 #include "unity.h"
 #include "ghIntegration.h"
+#include "resolution.h"
 
 #include "vm_atomic.h"
 #include "hostinfo.h"
@@ -70,6 +71,9 @@ VM_EMBED_VERSION(VMWAREUSER_VERSION_STRING);
 static char THIS_FILE[] = __FILE__;
 #endif
 
+#define WINDOW_TITLE    "vmware-user"
+#define LOCK_ATOM_NAME  "vmware-user-lock"
+
 #define INVALID_VALUE "Invalid option"
 #define INVALID_OPTION "Invalid value"
 #define INVALID_COMMAND "Invalid command format"
@@ -79,12 +83,10 @@ static char THIS_FILE[] = __FILE__;
  * Forward Declarations
  */
 void VMwareUser_OnDestroy(GtkWidget *widget, gpointer data);
-GtkWidget* VMwareUser_Create(void);
+GtkWidget* VMwareUser_CreateWindow(void);
 gint EventQueuePump(gpointer data);
 
-Bool VMwareUserRpcInResetCB    (char const **result, size_t *resultLen,
-                                const char *name, const char *args,
-                                size_t argsSize, void *clientData);
+Bool VMwareUserRpcInResetCB    (RpcInData *data);
 Bool VMwareUserRpcInSetOptionCB(char const **result, size_t *resultLen,
                                 const char *name, const char *args,
                                 size_t argsSize, void *clientData);
@@ -96,9 +98,10 @@ void VMwareUserRpcInErrorCB    (void *clientdata, char const *status);
 extern Bool ForeignTools_Initialize(GuestApp_Dict *configDictionaryParam);
 extern void ForeignTools_Shutdown(void);
 
-static Bool InitLockFile(void);
-static Bool TryAcquireLockFile(void);
-static void ReleaseLockFile(void);
+static Bool InitGdkWindow(GdkDisplay **dpy, GdkWindow **groupLeader,
+                          GdkWindow **rootWindow);
+static Bool AcquireDisplayLock(void);
+static Bool QueryX11Lock(Display *dpy, Window w, Atom lockAtom);
 
 
 /*
@@ -113,19 +116,16 @@ static Bool gHgfsServerRegistered;
 static pid_t gParentPid;
 static char gLogFilePath[PATH_MAX];
 
-/*
- * The lock file is used to -try- to prevent multiple instances of vmware-user
- * from executing.  See InitLockFile() for more information.
- */
-static char gLockFilePath[PATH_MAX] = "";
-static int gLockFileFd = -1;
-
 /*
  * From vmwareuserInt.h
  */
 RpcIn *gRpcIn;
 Display *gXDisplay;
 GtkWidget *gUserMainWidget;
+
+GtkWidget *gHGWnd;
+GtkWidget *gGHWnd;
+
 Window gXRoot;
 DblLnkLst_Links *gEventQueue;
 Bool optionCopyPaste;
@@ -187,11 +187,11 @@ void VMwareUserCleanupRpc(void)
          gOpenUrlRegistered = FALSE;
       }
       if (gResolutionSetRegistered) {
-         Resolution_Unregister();
+         Resolution_UnregisterCapability();
          gResolutionSetRegistered = FALSE;
       }
       if (gDnDRegistered) {
-         DnD_Unregister(gUserMainWidget);
+         DnD_Unregister(gHGWnd, gGHWnd);
          gDnDRegistered = FALSE;
       }
       if (gCopyPasteRegistered) {
@@ -292,13 +292,12 @@ EventQueuePump(gpointer data) // IN: Unused
 /*
  *-----------------------------------------------------------------------------
  *
- * VMwareUser_Create  --
+ * VMwareUser_CreateWindow  --
  *
- *      Create and init the main window. It's hidden, but we need it to recieve
- *      X-Windows messages
+ *      Create and initializes a hidden input only window for dnd and cp.
  *
  * Results:
- *      The main window widget.
+ *      An invisible gtk widget.
  *
  * Side effects:
  *      None.
@@ -307,7 +306,7 @@ EventQueuePump(gpointer data) // IN: Unused
  */
 
 GtkWidget*
-VMwareUser_Create(void)
+VMwareUser_CreateWindow(void)
 {
    GtkWidget *wnd;
 
@@ -335,22 +334,19 @@ VMwareUser_Create(void)
  */
 
 Bool
-VMwareUserRpcInResetCB(char const **result,     // OUT
-                       size_t *resultLen,       // OUT
-                       const char *name,        // IN
-                       const char *args,        // IN
-                       size_t argsSize,         // Unused
-                       void *clientData)        // Unused
+VMwareUserRpcInResetCB(RpcInData *data)   // IN/OUT
 {
    Debug("----------toolbox: Received 'reset' from vmware\n");
    if (gDnDRegistered) {
-      DnD_OnReset(gUserMainWidget);
+      DnD_OnReset(gHGWnd, gGHWnd);
+   }
+   if (gCopyPasteRegistered) {
+      CopyPaste_OnReset();
    }
    if (Unity_IsSupported()) {
       Unity_Exit();
    }
-   return RpcIn_SetRetVals(result, resultLen, "ATR " TOOLS_DND_NAME,
-                           TRUE);
+   return RPCIN_SETRETVALS(data, "ATR " TOOLS_DND_NAME, TRUE);
 }
 
 
@@ -411,15 +407,21 @@ VMwareUserRpcInCapRegCB(char const **result,     // OUT
       FoundryToolsDaemon_RegisterOpenUrlCapability();
    }
    if (!gResolutionSetRegistered) {
-      gResolutionSetRegistered = Resolution_Register();
+      gResolutionSetRegistered = Resolution_Register(gRpcIn);
    } else {
       Resolution_RegisterCapability();
    }
    if (!gDnDRegistered) {
-      gDnDRegistered = DnD_Register(gUserMainWidget);
+      gDnDRegistered = DnD_Register(gHGWnd, gGHWnd);
+      if (gDnDRegistered) {
+         UnityDnD state;
+         state.detWnd = gGHWnd;
+         state.setMode = DnD_SetMode;
+         Unity_SetActiveDnDDetWnd(&state);
+      }
    } else if (DnD_GetVmxDnDVersion() > 1) {
       if (!DnD_RegisterCapability()) {
-         DnD_Unregister(gUserMainWidget);
+         DnD_Unregister(gHGWnd, gGHWnd);
          gDnDRegistered = FALSE;
       }
    }
@@ -427,7 +429,7 @@ VMwareUserRpcInCapRegCB(char const **result,     // OUT
    if (!gCopyPasteRegistered) {
       gCopyPasteRegistered = CopyPaste_Register(gUserMainWidget);
    }
-   
+
    if (gCopyPasteRegistered) {
       if (!CopyPaste_RegisterCapability()) {
          CopyPaste_Unregister(gUserMainWidget);
@@ -522,13 +524,13 @@ VMwareUserRpcInSetOptionCB(char const **result,     // OUT
       if (strcmp(value, "1") == 0) {
          optionDnD = TRUE;
          if (!gDnDRegistered) {
-            DnD_Register(gUserMainWidget);
+            DnD_Register(gHGWnd, gGHWnd);
             gDnDRegistered = TRUE;
          }
       } else if (strcmp(value, "0") == 0) {
          optionDnD = FALSE;
          if (gDnDRegistered) {
-            DnD_Unregister(gUserMainWidget);
+            DnD_Unregister(gHGWnd, gGHWnd);
             gDnDRegistered = FALSE;
          }
       } else {
@@ -583,7 +585,6 @@ int VMwareUserXIOErrorHandler(Display *dpy)
    } else {
       Debug("VMwareUserXIOErrorHandler hit from forked() child, not cleaning Rpc\n");
    }
-   ReleaseLockFile();
    exit(1);
    return 1;
 }
@@ -704,19 +705,20 @@ main(int argc, char *argv[])
 
    /* Set to system locale. */
    setlocale(LC_CTYPE, "");
+   gtk_set_locale();
+   gtk_init(&argc, &argv);
 
    /*
-    * There can be only one vmware-user (in theory) per X session.
+    * Running more than 1 VMware user process (vmware-user) per X11 session
+    * invites bad juju.  The following routine ensures that only one instance
+    * will run per session.
     *
-    * Reminder:  Use of the lock file is entirely opportunistic.  If
-    * InitLockFile fails, we'll ignore it and continue on without lock file
-    * protection.
+    * NB:  The lock is tied to this process, so it disappears when we exit.
+    * As such, there is no corresponding unlock routine.
     */
-   if (InitLockFile()) {
-      if (TryAcquireLockFile() == FALSE) {
-         Warning("Another instance of vmware-user already running.  Exiting.\n");
-         return -1;
-      }
+   if (AcquireDisplayLock() == FALSE) {
+      Warning("Another instance of vmware-user already running.  Exiting.\n");
+      return -1;
    }
 
    gParentPid = getpid();
@@ -799,14 +801,15 @@ main(int argc, char *argv[])
       }
    }
 
-   gtk_set_locale();
-   gtk_init(&argc, &argv);
-
-   gUserMainWidget = VMwareUser_Create();
+   gUserMainWidget = VMwareUser_CreateWindow();
+   gHGWnd = VMwareUser_CreateWindow();
+   gGHWnd = VMwareUser_CreateWindow();
    /*
     * I don't want to show the window, but I need it's X window to exist.
     */
    gtk_widget_realize(gUserMainWidget);
+   gtk_widget_realize(gHGWnd);
+   gtk_widget_realize(gGHWnd);
 
 
    gXDisplay = GDK_WINDOW_XDISPLAY(gUserMainWidget->window);
@@ -837,6 +840,11 @@ main(int argc, char *argv[])
       return -1;
    }
 
+   /* Not fatal. */
+   if (Resolution_Init(TOOLS_DND_NAME, gXDisplay) == FALSE) {
+      Warning("Unable to initialize Guest Fit feature.\n\n");
+   }
+
    if (!RpcIn_start(gRpcIn, RPCIN_POLL_TIME, VMwareUserRpcInResetCB,
                     NULL, VMwareUserRpcInErrorCB, NULL)) {
       Warning("Unable to start the receive loop.\n\n");
@@ -853,9 +861,9 @@ main(int argc, char *argv[])
 
 #if !defined(N_PLAT_NLM) && !defined(sun)
    {
-      FoundryToolsDaemon_RegisterRoutines(gRpcIn, 
-                                          &confDict, 
-                                          gEventQueue, 
+      FoundryToolsDaemon_RegisterRoutines(gRpcIn,
+                                          &confDict,
+                                          gEventQueue,
                                           FALSE);
    }
 #endif
@@ -887,8 +895,6 @@ main(int argc, char *argv[])
       Debug("vmware-user failed to uninitialize blocking.\n");
    }
 
-   ReleaseLockFile();
-
    return 0;
 }
 
@@ -896,182 +902,296 @@ main(int argc, char *argv[])
 /*
  *-----------------------------------------------------------------------------
  *
- * InitLockFile --
- *
- *      Initializes gLockFileFd to a file descriptor on one of the following:
- *        1. $HOME/.vmware-user.<hostname>.<displayname>.lock
- *        2. /tmp/vmware-user.<uid>.<displayname>.lock
- *
- *      The first option is preferred, because I'd rather store a lock file
- *      where only our user can access it.  (This avoids a race involved with
- *      relying on known pathnames under /tmp.)  If that path is unavailable
- *      for any reason, we fall back to a path under /tmp.  
- *
- *      In the first case, even if the user's home directory is NFS mounted,
- *      NFS clients still honor fcntl() locks locally, so we would be good to go.
+ * InitGdkWindow --
  *
- *      This scheme is to be considered entirely advisory / opportunistic.
- *      I.e., if we're unable to create and open a lock file, we'll plod on,
- *      ignoring failures, and possibly launch multiple instances of vmware-user.
+ *      This routine sets a few properties related to our main window created
+ *      by {gdk,gtk}_init.  Specifically this routine sets the window title,
+ *      sets the override_redirect X11 property, and reparents it to the root
+ *      window,
  *
- *      NB:  The lock files are not removed upon exit.
+ *      In addition, this routine will return GDK handles for the following
+ *      objects:
+ *        - This application's default display (think $DISPLAY)
+ *        - Main or group leader window
+ *        - Display's root window
  *
  * Results:
- *      TRUE if the path was generated & lock file opened, FALSE otherwise.
+ *      TRUE on success, FALSE on failure.
  *
  * Side effects:
- *      On success:
- *         Lock file path is written to gLockFilePath.
- *         Lock file is opened and descriptor assigned to gLockFileFd.
+ *      Errors may be sent to stderr.
+ *      Window will have a title of WINDOW_TITLE.
+ *      Window, if not already directly parented by the root, will be.
+ *
+ *      dpy will point to our default display (ex: $DISPLAY).
+ *      groupLeader will point to the window created by gtk_init().
+ *      rootWindow will point to the root window on $DISPLAY.
  *
  *-----------------------------------------------------------------------------
  */
 
 static Bool
-InitLockFile(void)
+InitGdkWindow(GdkDisplay **defaultDisplay,      // OUT: default display
+              GdkWindow **groupLeader,          // OUT: group leader window
+              GdkWindow **rootWindow)           // OUT: root window
 {
-   struct passwd *pw = NULL;
-   /* XXX We really need a constant for maximum hostname lengths. */
-   char hostname[256] = "";
-   char *display = NULL;
+   GdkDisplay *myDefaultDisplay;
+   GdkWindow *myGroupLeader;
+   GdkWindow *myRootWindow;
 
-   if ((pw = getpwuid(getuid())) == NULL) {
-      Warning("%s: getpwuid: %s\n", __func__, strerror(errno));
-      return FALSE;
-   }
+   myDefaultDisplay = gdk_display_get_default();
 
-   if (gethostname(hostname, sizeof hostname) == -1) {
-      Warning("%s: gethostname: %s\n", __func__,  strerror(errno));
+   if (myDefaultDisplay == NULL) {
+      Warning("%s: unable to get default display\n", __func__);
       return FALSE;
    }
 
-   /*
-    * XXX Would it be any better to rely on something returned from gtk/gdk
-    * instead?
-    */
-   if ((display = getenv("DISPLAY")) == NULL) {
-      Warning("Environment variable DISPLAY missing.");
-      return FALSE;
-   }
+   myGroupLeader = gdk_display_get_default_group(myDefaultDisplay);
+   gdk_window_set_title(myGroupLeader, WINDOW_TITLE);
 
    /*
-    * Sure, the user could put some nasty things in DISPLAY, but what good
-    * would it do?  We're running with his/her permissions, anyway.
-    *
-    * Additionally, this may fail if someone's machine has a really long
-    * hostname.  Workarounds may include truncating the hostname, using an
-    * MD5 or SHA hash, etc.
+    * Sanity check:  Set the override redirect property on our group leader
+    * window (not default), then re-parent it to the root window (default).
+    * This makes sure that (a) a window manager can't re-parent our window,
+    * and (b) that we remain a top-level window.
     */
-   Str_Snprintf(gLockFilePath, sizeof gLockFilePath, "%s/.vmware-user.%s.%s.lock",
-                pw->pw_dir, hostname, display);
-
-   if ((gLockFileFd = open(gLockFilePath, O_CREAT | O_RDWR, 00600)) == -1) {
-      Debug("%s: %s: %s\n", __func__, gLockFilePath, strerror(errno));
-
-      /*
-       * If the first attempt to create a lock in the user's home directory
-       * failed, we generate a new lock file path under /tmp and make a
-       * second (and final) attempt.
-       */
-      Str_Snprintf(gLockFilePath, sizeof gLockFilePath,
-                   "/tmp/vmware-user.%"FMTUID".%s.lock", pw->pw_uid, display);
+   myRootWindow = gdk_get_default_root_window();
+   gdk_window_set_override_redirect(myGroupLeader, True);
+   gdk_window_reparent(myGroupLeader, myRootWindow, 10, 10);
+   gdk_display_sync(myDefaultDisplay);
 
-      if ((gLockFileFd = open(gLockFilePath, O_CREAT | O_RDWR, 00600)) == -1) {
-         Debug("%s: %s: %s\n", __func__, gLockFilePath, strerror(errno));
-      }
-   }
+   *defaultDisplay = myDefaultDisplay;
+   *groupLeader = myGroupLeader;
+   *rootWindow = myRootWindow;
 
-   /*
-    * To reiterate, true if we opened the file, false otherwise.
-    */
-   return (gLockFileFd != -1) ? TRUE : FALSE;
+   return TRUE;
 }
 
 
 /*
  *-----------------------------------------------------------------------------
  *
- * TryAcquireLockFile --
+ * AcquireDisplayLock --
  *
- *      Uses non-blocking fcntl() to try to lock gLockFileFd.
+ *      This function "locks" the display against being "claimed" by another
+ *      instance of vmware-user.  It will succeed if we're the first/only
+ *      instance of vmware-user, and fail otherwise.
  *
- *      Only call this if InitLockFile succeeded.  See InitLockFile re:
- *      advisory locking.
+ *      NB:  This routine must be called -after- gtk_init().
+ *
+ *      Vmware-user enjoys per-display exclusivity using the following algorithm:
+ *
+ *        1.  Grab X server.  (I.e., get exclusive access.)
+ *        2.  Search for top-level X windows meeting the following criteria:
+ *            a.  named "vmware-user"
+ *            b.  has the property "vmware-user-lock" set.
+ *        3a. If any such windows described above found, then another vmware-user
+ *            process is attached to this display, so we consider the display
+ *            locked.
+ *        3b. Else we're the only one.  Set the "vmware-user-lock" property on
+ *            our top-level window.
+ *        4.  Ungrab the X server.
  *
  * Results:
- *      TRUE if lock acquired, FALSE otherwise.
+ *      TRUE if "lock" acquired (i.e., we're the first/only vmware-user process);
+ *      otherwise FALSE.
  *
  * Side effects:
- *      On success, exclusive lock of gLockFileFd acquired.  On failure,
- *      gLockFileFd is closed and reset to -1.
+ *      The first time this routine is ever called during the lifetime of an X
+ *      session, a new X11 Atom, "vmware-user-lock" is created for the lifetime
+ *      of the X server.
+ *
+ *      The "vmware-user-lock" property may be set on this process's group leader
+ *      window.
  *
  *-----------------------------------------------------------------------------
  */
 
 static Bool
-TryAcquireLockFile(void)
+AcquireDisplayLock(void)
 {
-   struct flock lock;
+   Display *defaultDisplay;     // Current default X11 display.
+   Window queryWindow;          // Root window of defaultDisplay; used as root node
+                                // passed to XQueryTree().
+   Window groupLeader;          // Our instance's window group leader.  This is
+                                // implicitly created by gtk_init().
 
-   ASSERT(gLockFileFd != -1);
+   Window *children = NULL;     // Array of windows returned by XQueryTree().
+   unsigned int nchildren;      // Length of children.
 
-   lock.l_type = F_WRLCK;
-   lock.l_whence = SEEK_SET;
-   lock.l_start = 0;
-   lock.l_len = 0;
+   Window parent, root;         // Throwaway window IDs for XQueryTree().
+   Atom lockAtom;               // Refers to the "vmware-user-lock" X11 Atom.
 
-   if (fcntl(gLockFileFd, F_SETLK, &lock) == -1) {
-      Debug("%s: fcntl: %s\n", __func__, strerror(errno));
-      close(gLockFileFd);
-      gLockFileFd = -1;
+   unsigned int index;
+   Bool alreadyLocked = FALSE;  // Set to TRUE if we discover lock is held.
+   Bool retval = FALSE;
+
+   {
+      GdkDisplay *defaultDisplayGdk;
+      GdkWindow *groupLeaderGdk;
+      GdkWindow *rootWindowGdk;
+
+      /*
+       * Reset some of our main window's settings & fetch GDK handles for
+       * the default display, group leader, and root window.
+       */
+      if (InitGdkWindow(&defaultDisplayGdk, &groupLeaderGdk,
+                        &rootWindowGdk) == FALSE) {
+         Warning("%s: unable to initialize main window.\n", __func__);
+         return FALSE;
+      }
+
+      /*
+       * Since the rest of this routine works in terms of Xlib rather than
+       * GDK, convert GDK handles to backing Xlib handles.
+       */
+      defaultDisplay = gdk_x11_display_get_xdisplay(defaultDisplayGdk);
+      queryWindow = GDK_WINDOW_XWINDOW(rootWindowGdk);
+      groupLeader = GDK_WINDOW_XWINDOW(groupLeaderGdk);
+   }
+
+   /*
+    * Look up the lock atom, creating it if it doesn't already exist.
+    */
+   lockAtom = XInternAtom(defaultDisplay, LOCK_ATOM_NAME, False);
+   if (lockAtom == None) {
+      Warning("%s: unable to create X11 atom: " LOCK_ATOM_NAME "\n", __func__);
       return FALSE;
    }
 
-   return TRUE;
+   /*
+    * Okay, so at this point the following is done:
+    *
+    *   1.  Our top-level / group leader window is a child of the display's
+    *       root window.
+    *   2.  The window manager can't get its hands on said window.
+    *   3.  We have a handle on the X11 atom which will be used to identify
+    *       the X11 property used as our lock.
+    */
+
+   Debug("%s: Grabbing X server.\n", __func__);
+
+   /*
+    * Neither of these can fail, or at least not in the sense that they'd
+    * return an error.  Instead we'd likely see an X11 I/O error, tearing
+    * the connection down.
+    *
+    * XSync simply blocks until the XGrabServer request is acknowledged
+    * by the server.  It makes sure that we don't continue issuing requests,
+    * such as XQueryTree, until the server grants our "grab".
+    */
+   XGrabServer(defaultDisplay);
+   XSync(defaultDisplay, False);
+
+   /*
+    * WARNING:  At this point, we have grabbed the X server.  Consider the
+    * UI to be completely frozen.  Under -no- circumstances should we return
+    * without ungrabbing the server first.
+    */
+
+   if (XQueryTree(defaultDisplay, queryWindow, &root, &parent, &children,
+                  &nchildren) == 0) {
+      Warning("%s: XQueryTree failed\n", __func__);
+      goto out;
+   }
+
+   /*
+    * Iterate over array of top-level windows.  Search for those named
+    * vmware-user and with the property "vmware-user-lock" set.
+    *
+    * If any such windows are found, then another process has already
+    * claimed this X session.
+    */
+   for (index = 0; (index < nchildren) && !alreadyLocked; index++) {
+      char *name = NULL;
+
+      /* Skip unless window is named vmware-user. */
+      if ((XFetchName(defaultDisplay, children[index], &name) == 0) ||
+          (name == NULL) ||
+          strcmp(name, WINDOW_TITLE)) {
+         XFree(name);
+         continue;
+      }
+
+      /*
+       * Query the window for the "vmware-user-lock" property.
+       */
+      alreadyLocked = QueryX11Lock(defaultDisplay, children[index], lockAtom);
+      XFree(name);
+   }
+
+   /*
+    * Yay.  Lock isn't held, so go ahead and acquire it.
+    */
+   if (!alreadyLocked) {
+      unsigned char dummy[] = "1";
+      Debug("%s: Setting property " LOCK_ATOM_NAME "\n", __func__);
+      /*
+       * NB: Current Xlib always returns one.  This may generate a -fatal- IO
+       * error, though.
+       */
+      XChangeProperty(defaultDisplay, groupLeader, lockAtom, lockAtom, 8,
+                      PropModeReplace, dummy, sizeof dummy);
+      retval = TRUE;
+   }
+
+out:
+   XUngrabServer(defaultDisplay);
+   XSync(defaultDisplay, False);
+   XFree(children);
+
+   return retval;
 }
 
 
 /*
  *-----------------------------------------------------------------------------
  *
- * ReleaseLockFile --
- *
- *      Releases advisory lock on gLockFileFd, and closes it.  Note that the
- *      lock file will persist, because otherwise we have a race between 3
- *      processes:  us (P1), P2, and P3.
+ * QueryX11Lock --
  *
- *      P2      open
- *      P1      unlink
- *              [unlock]
- *      P3      open(O_CREAT) -- succeeds & is separate lock file
+ *      This is just a wrapper around XGetWindowProperty which queries the
+ *      window described by <dpy,w> for the property described by lockAtom.
  *
  * Results:
- *      None.
+ *      TRUE if property defined by parameters exists; FALSE otherwise.
  *
  * Side effects:
- *      Exclusive lock of gLockFileFd released.
+ *      None.
  *
  *-----------------------------------------------------------------------------
  */
 
-static void
-ReleaseLockFile(void)
+static Bool
+QueryX11Lock(Display *dpy,      // IN: X11 display to query
+             Window w,          // IN: window to query
+             Atom lockAtom)     // IN: atom used for locking
 {
-   struct flock lock;
-
-   if (gLockFileFd == -1) {
-      return;
+   Atom ptype;                  // returned property type
+   int pfmt;                    // returned property format
+   unsigned long np;            // returned # of properties
+   unsigned long remaining;     // amount of data remaining in property
+   unsigned char *data = NULL;
+
+   if (XGetWindowProperty(dpy, w, lockAtom, 0, 1, False, lockAtom,
+                          &ptype, &pfmt, &np, &remaining, &data) != Success) {
+      Warning("%s: Unable to query window %lx for property %s\n", __func__, w,
+              LOCK_ATOM_NAME);
+      return FALSE;
    }
 
-   lock.l_type = F_UNLCK;
-   lock.l_whence = SEEK_SET;
-   lock.l_start = 0;
-   lock.l_len = 0;
-
-   if (fcntl(gLockFileFd, F_SETLK, &lock) == -1) {
-      Debug("%s: fcntl: %s\n", __func__, strerror(errno));
+   /*
+    * Xlib is wacky.  If the following test is true, then our property
+    * didn't exist for the window in question.  As a result, `data' is
+    * unset, so don't worry about the lack of XFree(data) here.
+    */
+   if (ptype == None) {
+      return FALSE;
    }
 
-   close(gLockFileFd);
-   gLockFileFd = -1;
+   /*
+    * We care only about the existence of the property, not its value.
+    */
+   XFree(data);
+
+   return TRUE;
 }
index 237838aafb2bd92628716296e07d0099422af065..1c42e73233d7c5c7cc43aab8061288f1640d200d 100644 (file)
 #define FCP_FILE_TRANSFERRING                1
 #define FCP_FILE_TRANSFERRED                 2
 
-Bool Resolution_Register(void);
-Bool Resolution_RegisterCapability(void);
-Bool Resolution_Unregister(void);
-
-Bool DnD_Register(GtkWidget *mainWnd);
+Bool DnD_Register(GtkWidget *hgWnd, GtkWidget *ghWnd);
 Bool DnD_RegisterCapability(void);
-void DnD_Unregister(GtkWidget *mainWnd);
+void DnD_Unregister(GtkWidget *hgWnd, GtkWidget *ghWnd);
 uint32 DnD_GetVmxDnDVersion(void);
 int DnD_GetNewFileRoot(char *fileRoot, int bufSize);
-void DnD_OnReset(GtkWidget *mainWnd);
+void DnD_OnReset(GtkWidget *hgWnd, GtkWidget *gHWnd);
 Bool DnD_InProgress(void);
+void DnD_SetMode(Bool unity);
 
 Bool CopyPaste_Register(GtkWidget* mainWnd);
 Bool CopyPaste_RegisterCapability(void);
@@ -72,6 +69,7 @@ void CopyPaste_RequestSelection(void);
 Bool CopyPaste_GetBackdoorSelections(void);
 void CopyPaste_Unregister(GtkWidget* mainWnd);
 Bool CopyPaste_GHFileListGetNext(char **fileName, size_t *fileNameSize);
+void CopyPaste_OnReset(void);
 Bool CopyPaste_InProgress(void);
 Bool CopyPaste_IsRpcCPSupported(void);
 
@@ -83,8 +81,6 @@ extern Window gXRoot;
 extern DblLnkLst_Links *gEventQueue;
 extern GtkWidget *gUserMainWidget;
 extern Bool optionCopyPaste;
-extern Bool gCanUseVMwareCtrl;
-extern Bool gCanUseVMwareCtrlTopologySet;
 extern int gBlockFd;
 
 #endif // _VMWAREUSER_INT_H_
index 88a0b899cfa9f659049f1631458aaff839093900..f880eedbe4fb7ffd85dfbedc4e281e5a062dc16f 100644 (file)
@@ -159,6 +159,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@
 PROCPS_LIBS = @PROCPS_LIBS@
 RANLIB = @RANLIB@
+RPCGEN = @RPCGEN@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@