]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:19:52 +0000 (11:19 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix StrUtil_StartsWith.
VMware, Inc [Tue, 24 Aug 2010 18:19:22 +0000 (11:19 -0700)] 
Fix StrUtil_StartsWith.

When the two strings diverge at the last non-NUL byte of the
prefix string, or at the byte preceding a trailing path separator,
the functions incorrectly return TRUE.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:18:12 +0000 (11:18 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:17:42 +0000 (11:17 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDistinguish openSUSE from SuSE.
VMware, Inc [Tue, 24 Aug 2010 18:17:00 +0000 (11:17 -0700)] 
Distinguish openSUSE from SuSE.

Workstation had a single "opensuse" key (as opposed to "opensuse10" and
"opensuse11") in guest_os_common.c.  This was moved to guest_os.h and
used in lib/misc.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix System_Uptime.
VMware, Inc [Tue, 24 Aug 2010 18:16:07 +0000 (11:16 -0700)] 
Fix System_Uptime.

This change keeps the POSIX impl. of System_Uptime as a new function,
System_GetTimeMonotonic.  This was done in order to keep around a
cheap routine suitable for use by the EventManager library.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBug 590562: vmtoolsd consumes 15% cpu all the time
VMware, Inc [Tue, 24 Aug 2010 18:15:33 +0000 (11:15 -0700)] 
Bug 590562: vmtoolsd consumes 15% cpu all the time

In old VMwareUser we have a pointer loop which runs 10 times per second.
With new vmtoolsd we mistakely set the time interval to be 10 ms, which
means the pointer loop runs 100 times per second, and consumes lot of
cpu. Changing the time interval to 100 ms fixes the bug.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:15:12 +0000 (11:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoVMCIDoorbell_Destroy: Assert when destroying non existent handle.
VMware, Inc [Tue, 24 Aug 2010 18:13:31 +0000 (11:13 -0700)] 
VMCIDoorbell_Destroy: Assert when destroying non existent handle.

The VMCINotificationUnregister function in the vmci guest driver
was asserting FALSE when destroying a doorbell handle that does not
exist in the internal hash. This was causing the guest kernel to panic
when trying to destroy a handle that was already destroyed.

We should probably just return VMCI_ERROR_NOT_FOUND here instead of
asserting.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:10:34 +0000 (11:10 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:09:47 +0000 (11:09 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake hgfs build on 2.6.35 without warnings.
VMware, Inc [Tue, 24 Aug 2010 18:09:28 +0000 (11:09 -0700)] 
Make hgfs build on 2.6.35 without warnings.

2.6.35 ChangeLog http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.35-rc1
mentions this: "drop unused dentry argument to ->fsync".
Fix hgfs to accomodate that.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAdd a couple more tests to the vmtoolsd basic tests.
VMware, Inc [Tue, 24 Aug 2010 18:09:10 +0000 (11:09 -0700)] 
Add a couple more tests to the vmtoolsd basic tests.

. add more fields to the test XDR struct to really make sure auto
marshaling / unmarshaling is working.
. validate the result of the "msg3" RPC so we check that auto
marshaling is working when returning data.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:08:55 +0000 (11:08 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 18:04:43 +0000 (11:04 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoPollDefault: Log lock data before ASSERT to aid debugging
VMware, Inc [Tue, 24 Aug 2010 18:03:51 +0000 (11:03 -0700)] 
PollDefault: Log lock data before ASSERT to aid debugging

Add a function to print out an MXUserRecLock's internal data, and use
that before an ASSERT in PollDefault that checks for real-time
callback that is starved by a lock.  This is necessary as for some
reason the hostd cores that were generated due to this ASSERT never
have the state of the lock and the lock owner at the time of the ASSERT
(the lock is always free in the core and the thread that probably held
the lock is not anywhere such lock is held).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix a possible buffer overrun. Remove an extra space character.
VMware, Inc [Tue, 24 Aug 2010 18:03:27 +0000 (11:03 -0700)] 
Fix a possible buffer overrun. Remove an extra space character.

We want argBufPtr to point to the end of the argBuf buffer, where the '\0'
character is. So argBufPtr should be set to  argBuf +  strlen(argBuf).
Otherwise, if the argument string fully fills up argBuf, we could have
a buffer overrun when *argbufPtr = '\0' is performed.

The other change removes the extra space character at the end of
cmdLine in the ExtractCommandLineFromAddressSpaceFile function.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/misc: fix a commment
VMware, Inc [Tue, 24 Aug 2010 18:03:07 +0000 (11:03 -0700)] 
lib/misc: fix a commment

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Tue, 24 Aug 2010 18:02:54 +0000 (11:02 -0700)] 
Internal branch sync. Included in this change:

. VI process guest op support: RunProgram, ListProcesses and ReadEnvVariables

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:56:49 +0000 (10:56 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAddress Memory leak and Kernel panic.
VMware, Inc [Tue, 24 Aug 2010 17:56:26 +0000 (10:56 -0700)] 
Address Memory leak and Kernel panic.

This change fixes 3 problems:

1) Memory leak - linux kernel module once unloaded did not return pages back
to the guest.

2) sizeof incorrect value. Instead of getting size of a structure I was
getting size of a pointer. Fix is obvious.

3) Unlink elements on the host, so that list is in sane state after all
the elements are removed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMove cpFileContents.x to dndcp plugin directory in open-vm-tools.
VMware, Inc [Tue, 24 Aug 2010 17:56:02 +0000 (10:56 -0700)] 
Move cpFileContents.x to dndcp plugin directory in open-vm-tools.

This is a plugin-specific definition and should be built by the
plugin itself.

Also add a license file for the plugin, which I forgot previously.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoWhen a handle being passed down to VMCIDoorbell_Create() was not initialized
VMware, Inc [Tue, 24 Aug 2010 17:54:34 +0000 (10:54 -0700)] 
When a handle being passed down to VMCIDoorbell_Create() was not initialized
to VMCI_INVALID_HANDLE, a doorbell was being created with context id 0
(hypervisor id) and a large resource id (likely the garbage value in
handle.resource).

On the guest side, modified VMCINotifyHashAddEntry so that if the handle
passed down is not VMCI_INVALID_HANDLE and if the context id of the handle
is not the context id of the VM, VMCI_ERROR_INVALID_ARGS will be returned.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:53:55 +0000 (10:53 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agounity: remove deprecated code.
VMware, Inc [Tue, 24 Aug 2010 17:53:35 +0000 (10:53 -0700)] 
unity: remove deprecated code.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:52:43 +0000 (10:52 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:52:22 +0000 (10:52 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:51:59 +0000 (10:51 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges for VIX Guest Operations support for Solaris.
VMware, Inc [Tue, 24 Aug 2010 17:51:42 +0000 (10:51 -0700)] 
Changes for VIX Guest Operations support for Solaris.

The changes in this changeset collectively implement guest operations
support for Solaris VMs. The changes to each of the c files are
described in more detail below.

lib/procMgr/procMgrPosix.c, lib/procMgr/procMgrSolaris.c:
new implementation of impersonation and listProcesses for Solaris

lib/authPosix.c:
allow user authentication to work for Solaris

lib/misc/posixDlopen.c:
allow Posix_Dlopen for Solaris guests

lib/system/systemLinux.c:
allow System_[Set,Get]Env for Solaris, required for VixVM[Write,Read]Variable

service/plugins/vix/vixTools.c:
Enable calling of Guest operations for Solaris Guests

lib/file/fileIO.c, bora/lib/file/fileIOPosix.c
Allow solaris guests to call FileIO_Pread

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove some dead code.
VMware, Inc [Tue, 24 Aug 2010 17:50:07 +0000 (10:50 -0700)] 
Remove some dead code.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:49:44 +0000 (10:49 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoopen-vm-tools cleanups.
VMware, Inc [Tue, 24 Aug 2010 17:48:47 +0000 (10:48 -0700)] 
open-vm-tools cleanups.

. remove lib/resolution, now unused.
. remove duplicated stubs.
. remove checks for old glibc versions, add check for glibc 2.4.
. get rid of VMWARE_USER_LDADD.
. add HAVE_DNET so we don't use DNET_LIBS unless it's defined.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/misc: improve LogFixed a bit
VMware, Inc [Tue, 24 Aug 2010 17:43:28 +0000 (10:43 -0700)] 
lib/misc: improve LogFixed a bit

The LogFixed routines can easily provide improved output by adding
a simple interpolation correction to the table lookup value.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:42:21 +0000 (10:42 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Tue, 24 Aug 2010 17:42:03 +0000 (10:42 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix build warning.
VMware, Inc [Tue, 24 Aug 2010 17:40:19 +0000 (10:40 -0700)] 
Fix build warning.

We changed all if _MSC_VER to if defined(_MSC_VER) a long
time ago to quiet warnings.  Some always sneak back in...

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoUpdating open-vm-tools version for release 2010.07.25-280253. 2010.07.25-280253
VMware, Inc [Mon, 26 Jul 2010 22:07:53 +0000 (15:07 -0700)] 
Updating open-vm-tools version for release 2010.07.25-280253.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoopen-vm-tools: link guestInfo plugin to dnet.
VMware, Inc [Mon, 26 Jul 2010 19:27:03 +0000 (12:27 -0700)] 
open-vm-tools: link guestInfo plugin to dnet.

Since the plugin now calls dnet directly, it needs to link to it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix Solaris open-vm-tools build.
VMware, Inc [Mon, 26 Jul 2010 19:26:18 +0000 (12:26 -0700)] 
Fix Solaris open-vm-tools build.

Need to include crypt.h to get crypt(3).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoghi: use native environment from app ctx.
VMware, Inc [Mon, 26 Jul 2010 19:26:03 +0000 (12:26 -0700)] 
ghi: use native environment from app ctx.

The "environ" variable seems to be a leftover from olden vmware-user days.
The ToolsAppCtx struct contains the native environent for plugins to use
in vmtoolsd-land.

Also add a new line at the end of unity.x to make rpcgen quiet.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFixing probelms with legacy guests.
VMware, Inc [Mon, 26 Jul 2010 19:25:29 +0000 (12:25 -0700)] 
Fixing probelms with legacy guests.

Making sure that accurate packet length is returned to the guest.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:24:54 +0000 (12:24 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:24:11 +0000 (12:24 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove GLIBC_VERSION_21 and _22
VMware, Inc [Mon, 26 Jul 2010 19:23:51 +0000 (12:23 -0700)] 
Remove GLIBC_VERSION_21 and _22

Glibc version 2.2 dates from RedHat 7.1 (released 2001).
Any code we have on modern branches no longer works on
things that old (guest tools are frozen, hosted lost
support long ago).

This change removes a bunch of GLIBC_VERSION checks
from our code.

NOTE: GLIBC_VERSION_23 checks are still in use; we
support such old OSes (RH7.1-3, RH8.0, RHEL2.x) with
the guest tools build.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:23:35 +0000 (12:23 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/log: Formally handle the maximum message length
VMware, Inc [Mon, 26 Jul 2010 19:23:17 +0000 (12:23 -0700)] 
lib/log: Formally handle the maximum message length

Provide a way to ask what the maximum message length is. Use it
to avoid creating a line too long within the MXUser lock statistics
code.

With a bit of minor code rearranging, only a single, full-sized
message buffer needs to be kept on the stack to log a message.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:22:56 +0000 (12:22 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:22:34 +0000 (12:22 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoAdd the unity plugin to open-vm-tools.
VMware, Inc [Mon, 26 Jul 2010 19:21:25 +0000 (12:21 -0700)] 
Add the unity plugin to open-vm-tools.

. stage the new sources.
. move unity-specific libraries to the new plugin directory.
. move unity/ghi XDR definitions to the new plugin directory.
. re-enable build of a few libraries used by the unity code.
. explicitly include str.h to avoid a compiler warning.
. move dndGuest.h back into the lib/include directory since unity
uses it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix euidaccess call in lib/file
VMware, Inc [Mon, 26 Jul 2010 19:20:10 +0000 (12:20 -0700)] 
Fix euidaccess call in lib/file

cs 899353 added some broken code inside #ifdef GLIBC_VERSION_24.
Since GLIBC_VERSION_24 was erroneously never set, this went unnoticed
for a long time.  This change creates a new Posix_EuidAccess()
function and calls it directly instead of embedding euidaccess()
inside FileAttributes() in lib/file.  When Posix_EuidAccess() is
unavailable, the fallback uses FileAttributes().

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:19:38 +0000 (12:19 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoAdd dndcp plugin to open-vm-tools.
VMware, Inc [Mon, 26 Jul 2010 19:19:13 +0000 (12:19 -0700)] 
Add dndcp plugin to open-vm-tools.

Also stage the source for libraries only used by the plugin under the
plugin's directory, instead of the top-level "lib" directory.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoAdd desktopEvents plugins to open-vm-tools.
VMware, Inc [Mon, 26 Jul 2010 19:18:45 +0000 (12:18 -0700)] 
Add desktopEvents plugins to open-vm-tools.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoCleanup lib/guestapp.
VMware, Inc [Mon, 26 Jul 2010 19:18:29 +0000 (12:18 -0700)] 
Cleanup lib/guestapp.

This changes removes a bunch of code that is not used anywhere in Tools.
This includes:

. CPName versions of RpcOut functions.
. A lot of GuestDict related functions.
. Some old mouse and copy/paste-related functions with no call sites.

There are still other functions that we'll be able to remove once
we're not building vmware-user anymore.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:17:37 +0000 (12:17 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:17:14 +0000 (12:17 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoInternal branch sync. Included in this change:
VMware, Inc [Mon, 26 Jul 2010 19:16:48 +0000 (12:16 -0700)] 
Internal branch sync. Included in this change:

. bump tools version.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove vmware-user from open-vm-tools.
VMware, Inc [Mon, 26 Jul 2010 19:13:53 +0000 (12:13 -0700)] 
Remove vmware-user from open-vm-tools.

This change does a little bit more than just remove the sources. It also
modifies the vmware-user-suid-wrapper so that it executes
"vmtoolsd -n vmusr" in open-vm-tools. The desktop file is also fixed to
execute the suid wrapper, which is the right thing to do.

Also remove locationsdb.c from open-vm-tools, since it's not used there.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/log: prepratory changes before adding syslog
VMware, Inc [Mon, 26 Jul 2010 19:13:27 +0000 (12:13 -0700)] 
lib/log: prepratory changes before adding syslog

I've always disliked that logInt.h was in public. Fix that. Also
add some missing function headers.

Log and Warning functions that accept va_lists were missing so I added
them, using one of them in one place to remove one logInt.h inclusion.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:13:06 +0000 (12:13 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:12:21 +0000 (12:12 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoGuestInfo: Init NetUtil directly.
VMware, Inc [Mon, 26 Jul 2010 19:11:56 +0000 (12:11 -0700)] 
GuestInfo: Init NetUtil directly.

Whoops.  On Windows one must call an initialization routine for netutil
to be of any use.  vmtoolsd handles this, but now that GuestInfo links
netutil in statically, this plugin must manage its own iphlpapi resources.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoWell if you're going to do that...
VMware, Inc [Mon, 26 Jul 2010 19:11:01 +0000 (12:11 -0700)] 
Well if you're going to do that...

COMPILER_MEM_BARRIERS were added for lib/file. lib/lock
should get them for the same reasons...

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoGet rid of ghIntegrationStub.
VMware, Inc [Mon, 26 Jul 2010 19:10:11 +0000 (12:10 -0700)] 
Get rid of ghIntegrationStub.

The stub library is not needed anymore now that we can just choose
where to compile the respective plugin.

Also remove leftover unityStub sources and Makefile.am.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: review comments
VMware, Inc [Mon, 26 Jul 2010 19:09:35 +0000 (12:09 -0700)] 
lib/lock: review comments

Don't "Ex", make the name formally "Silent".

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: improve a comment
VMware, Inc [Mon, 26 Jul 2010 19:09:20 +0000 (12:09 -0700)] 
lib/lock: improve a comment

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: improve a comment and review comment
VMware, Inc [Mon, 26 Jul 2010 19:09:10 +0000 (12:09 -0700)] 
lib/lock: improve a comment and review comment

Improve a review comment. One review comment from the
ulRec.c change can be propogated to the other objects.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/log: the log lock has magical properties
VMware, Inc [Mon, 26 Jul 2010 19:08:50 +0000 (12:08 -0700)] 
lib/log: the log lock has magical properties

The log facility must use a lock. If the lock acquisition routine
were to use Log/Warning an infinite recursion is set up:

Log -> Lock -> Log -> Lock ...

It makes it imperitive that the log facility lock never have the
potential to emit a message. We just don't know where a developer
will place a Log/Warning.

The fix for this is an alternative lock creation routine, limited
to the recursive lock required for the log facility, that allows
the specification of a new parameter - beSilent (damn it!).

Ultimately this works because the core locking logic is inherently
silent; only the statistics code, if present, has to be bypassed.

Since this ultimately fixes a PR, the work-around to this issue
can also be removed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: Intel specific statistics are no longer true
VMware, Inc [Mon, 26 Jul 2010 19:08:15 +0000 (12:08 -0700)] 
lib/lock: Intel specific statistics are no longer true

Originally the timing routines used by lib/lock were RDTSC based,
making them Intel specific. Once nanosecond clocks were available
from lib/misc (i.e. Hostinfo_SystemTimerNS) the RDTSC and Intel
dependencies were eliminated.

This is trivial... remove the ifdef preventing statistics unless
they were Intel architecture.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoInternal branch sync. Included in this change:
VMware, Inc [Mon, 26 Jul 2010 19:06:58 +0000 (12:06 -0700)] 
Internal branch sync. Included in this change:

. Use right Linux APIs to access multicast address list.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: Detect contention in multiple ways
VMware, Inc [Mon, 26 Jul 2010 19:05:45 +0000 (12:05 -0700)] 
lib/lock: Detect contention in multiple ways

The locking code can detect contention in two ways:

a) The number of failed acquisitions divided by the
total number of acquisitions.

b) Detected contention while successfully acquiring.

Use the larger of these two to report the contention ratio
for statistics. This provides a more flexible way to detect
any contention, regardless of how/what is reported.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: simplified and improved barrier
VMware, Inc [Mon, 26 Jul 2010 19:05:17 +0000 (12:05 -0700)] 
lib/lock: simplified and improved barrier

Based on the review comments, remove the emptying state
variable and simplify the code appropropriately.

Dump the context of the barrier in curContext order, as
requested.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMove GuestInfo library code to plugin.
VMware, Inc [Mon, 26 Jul 2010 19:04:55 +0000 (12:04 -0700)] 
Move GuestInfo library code to plugin.

Rather than have feature-specific code be a part of and versioned
with vmtoolslib, I moved the GuestInfo library code over to the
plugin directory itself.  The only call into lib/guestInfo not from
the plugin was GuestInfo_GetFqdn, which I moved to System_GetNodeName.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoACK! "p5 reopen does it again"
VMware, Inc [Mon, 26 Jul 2010 19:03:56 +0000 (12:03 -0700)] 
ACK! "p5 reopen does it again"

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: move the stats data under a single pointer
VMware, Inc [Mon, 26 Jul 2010 19:03:35 +0000 (12:03 -0700)] 
lib/lock: move the stats data under a single pointer

Each of the MXUser object that collects statistics has its
statistical data ifdef compiled into its internal structure. Move
the statistical data into a private structure accessed from a
single pointer with the private structure.

This cleans up a lot of MXUSER_STATS ifdefs which become unnecessary
and get the code very close to being able to runtime turn on of
statistics in any build. For now, statistics are for stats builds only.

All this is done without introducing any overhead to speak of, only
one memory read from a cache line already loaded.

This is also a prepratory change to fix a problem in Log - the lock
allocation cannot call anything that might Log.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 19:02:56 +0000 (12:02 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: break out your Kevlar
VMware, Inc [Mon, 26 Jul 2010 19:02:21 +0000 (12:02 -0700)] 
lib/lock: break out your Kevlar

This was pointed out in comments from the original barrier review; I had
a "bullet proof barrier" change coming. Here you go.

Barriers are often used like this:

barrier
code
barrier

If the code is small enough or the code has a variable amount of
work and/or there are scheduler "funnies" it is possible to have
a thread arrive at the second barrier while threads are still exiting
the first barrier. That can lead to some very unobvious and strange
bugs.

The original barrier would detect this and assert. Let's do better.

This version catches the threads entering and parks them separate from
the threads leaving ensuring the everything works as expected; no
violation of the principal of least surprise.

This adds little in the way of complexity and memory use while
providing a great deal of protection (~type IIa).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/misc: a nicer fix for codeset
VMware, Inc [Mon, 26 Jul 2010 19:01:27 +0000 (12:01 -0700)] 
lib/misc: a nicer fix for codeset

The uint8 ensures no signs get in the way. We're fine with them but
this way is even clearer.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/misc: remove uint8 from codeset.c
VMware, Inc [Mon, 26 Jul 2010 19:00:54 +0000 (12:00 -0700)] 
lib/misc: remove uint8 from codeset.c

No need for uint8 in codeset, use char instead.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: the other, other shoe drops (Martians)
VMware, Inc [Mon, 26 Jul 2010 19:00:36 +0000 (12:00 -0700)] 
lib/file: the other, other shoe drops (Martians)

The file locking code returned a "void *" for the lockToken. This
isn't as nice as using an opaque type. Alter the data type
and fix any affected code ccordingly.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: holdStart under stats
VMware, Inc [Mon, 26 Jul 2010 18:59:50 +0000 (11:59 -0700)] 
lib/lock: holdStart under stats

The holdStart variable is stats specific... save some space in
other builds.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: the other shoe drops
VMware, Inc [Mon, 26 Jul 2010 18:59:27 +0000 (11:59 -0700)] 
lib/file: the other shoe drops

Remove the pathName argument from FileLock_Unlock as it is now
unnecessary. This is essentially a mechanical change however the
fileTrack wrapper routine had to change to convert the lockToken
into a fileName so it could function properly, requiring a custom
function to be created.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 18:58:39 +0000 (11:58 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/misc: review comment
VMware, Inc [Mon, 26 Jul 2010 18:58:19 +0000 (11:58 -0700)] 
lib/misc: review comment

Improve a comment.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: preparatory change toward simplifying FileLock_Unlock
VMware, Inc [Mon, 26 Jul 2010 18:58:04 +0000 (11:58 -0700)] 
lib/file: preparatory change toward simplifying FileLock_Unlock

The FileLock_Lock routine returns an abstract file lock token
representing the lock on the file. There is no functional need
to base the name of the file to be unlocked to FileLock_Unlock
since the token should already contain the necessary information
for the unlock.

This change lays the groundwork. The next one will clean up all
of the FileLock_Unlock callers. In the end all of this is being
done because "it's the right thing to do" and because Kevin has
a need for it - it will make a mainMem cleanup easier.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove compat_wait.h
VMware, Inc [Mon, 26 Jul 2010 18:57:43 +0000 (11:57 -0700)] 
Remove compat_wait.h

Another chunk of code thst is not needed on recent (2.6.9+) kernels.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoCleanup VIX code.
VMware, Inc [Mon, 26 Jul 2010 18:56:57 +0000 (11:56 -0700)] 
Cleanup VIX code.

Move vixTools library into the plugin directory, and clean up legacy code not
used anymore.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/misc: UTF8<->UTF32 conversions
VMware, Inc [Mon, 26 Jul 2010 18:56:06 +0000 (11:56 -0700)] 
lib/misc: UTF8<->UTF32 conversions

While doing this, provide a piece of missing functionality - determining
the length of the UTF8 string in code points (unicode characters). The
existing length routines return the length of the string is (physical)
bytes.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoCorrectly initialize the vm_atomic.h variables.
VMware, Inc [Mon, 26 Jul 2010 18:55:24 +0000 (11:55 -0700)] 
Correctly initialize the vm_atomic.h variables.

Also unrelated changes from private branch merge.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMerge common unity/ghi library changes from private branch.
VMware, Inc [Mon, 26 Jul 2010 18:54:04 +0000 (11:54 -0700)] 
Merge common unity/ghi library changes from private branch.

This change touches the shares unity/ghi libraries, making them incompatible
with their current use in vmware-user. The plugin is not yet built.
Signal from unity plugin to dndcp plugin to notify transitions into
and out of unity state.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMerge common dnd code changes from private branch.
VMware, Inc [Mon, 26 Jul 2010 18:53:28 +0000 (11:53 -0700)] 
Merge common dnd code changes from private branch.

This merges common dnd code, and makes the code incompatible with its
current use in vmware-user. The plugin itself is not built yet. The
detWndTest test had to be removed from the build since it now fails
to compile.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMake vmware-user an empty application.
VMware, Inc [Mon, 26 Jul 2010 18:52:41 +0000 (11:52 -0700)] 
Make vmware-user an empty application.

This change removes the code from vmware-user, allowing it to build,
so that the installer builds still work. This allows changes in the
shared libraries (such as lib/dndGuest and lib/unity) to be made to
support the new plugins, before switching the installer to consume
them.

Drop (for now at least) the Unity features from the open-vm-tools package.

Stop building vixTools as a standalone library.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoAlways define VMW_NETCREATE_KERNARG for Linux 2.6.33+
VMware, Inc [Mon, 26 Jul 2010 18:50:11 +0000 (11:50 -0700)] 
Always define VMW_NETCREATE_KERNARG for Linux 2.6.33+

To deal with the fact that a change from Linux 2.6.33 adding
an extra argument to the create field of struct
net_proto_family was backported to certain earlier kernels,
VMW_NETCREATE_KERNARG was introduces in change 1065091.

Instead of requiring all future PBMs for 2.6.33+ kernels to
specify the VMW_NETCREATE_KERNARG, we let VMCI sockets define
it for the appropriate kernels.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoSolaris Ballon: fix crash on unload
VMware, Inc [Mon, 26 Jul 2010 18:49:46 +0000 (11:49 -0700)] 
Solaris Ballon: fix crash on unload

We should finish balloon cleanup before deleting ID space otherwise
we will crash when unloading balloon module if we have ballooned
pages at the time.

This bug was introduced during recent balloon cleanups.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoBug 580142: internal compiler error: output_operand: invalid
VMware, Inc [Mon, 26 Jul 2010 18:49:34 +0000 (11:49 -0700)] 
Bug 580142: internal compiler error: output_operand: invalid

We did not touch the function for long time. I guess that some recent
gcc bug caused the problem. This will work around the compiler error.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 18:49:18 +0000 (11:49 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: pretty up some code
VMware, Inc [Mon, 26 Jul 2010 18:48:58 +0000 (11:48 -0700)] 
lib/lock: pretty up some code

Clean up some code; make the barrier singleton look like the
other singleton codes.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 18:48:10 +0000 (11:48 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: standardize the singleton technique
VMware, Inc [Mon, 26 Jul 2010 18:45:31 +0000 (11:45 -0700)] 
lib/lock: standardize the singleton technique

Explicitly have a lock pointer and new lock pointer and always read from
the atomic storage into the lock pointer.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years ago. add API enabled properties for VI guest ops
VMware, Inc [Mon, 26 Jul 2010 18:44:28 +0000 (11:44 -0700)] 
. add API enabled properties for VI guest ops

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>