]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
15 years agolib/misc: fix a comment
VMware, Inc [Mon, 20 Dec 2010 21:44:11 +0000 (13:44 -0800)] 
lib/misc: fix a comment

Function name in header is wrong

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/misc: expose a useful function
VMware, Inc [Mon, 20 Dec 2010 21:43:16 +0000 (13:43 -0800)] 
lib/misc: expose a useful function

There are some serious problems with lib/unicode; exposing this
function will make the fixes rather easy and fairly obvious.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUndo HGFS memory leak fix.
VMware, Inc [Mon, 20 Dec 2010 21:42:42 +0000 (13:42 -0800)] 
Undo HGFS memory leak fix.

It seems to cause issues with registering apps. I'll let the HGFS guys fix
the leak as part of cleaning up this channel registration code (bug 638446).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAddress feedback in vm_basic_types.h
VMware, Inc [Mon, 20 Dec 2010 21:42:23 +0000 (13:42 -0800)] 
Address feedback in vm_basic_types.h

The gcc-3.3 enforcement preprocessor error has a &&/||
precedence problem.  Add appropriate parens.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmtoolsd: introduce service properties.
VMware, Inc [Mon, 20 Dec 2010 21:41:51 +0000 (13:41 -0800)] 
vmtoolsd: introduce service properties.

Service properties are a way for plugins to share data without having
link-time dependencies. A plugin can export a property in vmtoolsd's
service object (the same object used currently to send signals), and
that property can be retrieved at any time. Thanks to GObject's property
system, there's also notification of changes, using glib signals.

The properties are not ref counted by the service, so plugins need to agree
on the lifecycle of the property for things to work safely.

Extra: fix an issue in pluginMgr.c where invalid memory was being used
after an array reallocation.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove pre-gcc-3.3 crud from our headers
VMware, Inc [Mon, 20 Dec 2010 21:41:42 +0000 (13:41 -0800)] 
Remove pre-gcc-3.3 crud from our headers

gcc-3.3 itself is ancient, but some linux driver builds
use it.  Everything else is even more modern.

This change strips out a bunch of the pre-gcc-3.3
preprocessor magic from some of the very common header
files.

Most notable: VM_ASM_PLUS is vacuously true.  So it's gone.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake VMCI logging use SYSLOG importance levels
VMware, Inc [Mon, 20 Dec 2010 21:40:01 +0000 (13:40 -0800)] 
Make VMCI logging use SYSLOG importance levels

This change converts the VMCI logging macros to using the
following three importance levels; debug, info and warning.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/misc: cleanup from backouts
VMware, Inc [Mon, 20 Dec 2010 21:39:45 +0000 (13:39 -0800)] 
lib/misc: cleanup from backouts

One little piece was left lying around. Remove it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix return code of HGFS channel activation function.
VMware, Inc [Mon, 20 Dec 2010 21:39:35 +0000 (13:39 -0800)] 
Fix return code of HGFS channel activation function.

HgfsChannelActivateChannel should return TRUE if channel has already been
initialized.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity: Reformat incomplete, unused plugin Doxygen comments as VMW style.
VMware, Inc [Mon, 20 Dec 2010 21:39:19 +0000 (13:39 -0800)] 
Unity: Reformat incomplete, unused plugin Doxygen comments as VMW style.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoremove lib/region and lib/raster compiler warnings for type conversion
VMware, Inc [Mon, 20 Dec 2010 21:39:09 +0000 (13:39 -0800)] 
remove lib/region and lib/raster compiler warnings for type conversion

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRun all debug plugin callbacks within a cunit context.
VMware, Inc [Mon, 20 Dec 2010 21:36:55 +0000 (13:36 -0800)] 
Run all debug plugin callbacks within a cunit context.

This allows cunit asserts in a debug plugin's shutdown function.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 20 Dec 2010 21:36:47 +0000 (13:36 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: simple cleanup
VMware, Inc [Mon, 20 Dec 2010 21:36:31 +0000 (13:36 -0800)] 
lib/unicode: simple cleanup

Some trivial cleanups

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix vsock connect on listening socket
VMware, Inc [Mon, 20 Dec 2010 21:36:21 +0000 (13:36 -0800)] 
Fix vsock connect on listening socket

A switch statement in Linux vsock was having a case outside
the enum value range. On closer examination, we are testing
for a value, that is never set. I verified that calling
connect on socket in the listen case will fall through and hit
the default case, since sock->state is still in the
SS_UNCONNECTED state but sk->sk_state is SS_LISTEN. Looking at
other protocol implementations, sk->sk_state is used for the
procotol specific state, so this change simply catches the
SS_LISTEN state in the default case entry, instead of trying
to assign SS_LISTEN to the sock->state when the socket is put
in listening state.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Mon, 20 Dec 2010 21:36:11 +0000 (13:36 -0800)] 
Internal branch sync. Included in this change:

. work for new version of DnD protocol is merged into open-vm-tools.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUpdating open-vm-tools version for release 2010.11.17-327185. 2010.11.17-327185
VMware, Inc [Thu, 18 Nov 2010 23:04:00 +0000 (15:04 -0800)] 
Updating open-vm-tools version for release 2010.11.17-327185.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:57:25 +0000 (14:57 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDon't use g_atomic_int_set in old glib versions.
VMware, Inc [Thu, 18 Nov 2010 22:57:01 +0000 (14:57 -0800)] 
Don't use g_atomic_int_set in old glib versions.

Also use the correct version check macro. In old versions, emulate set()
with an assignment + explicit fence.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/log: trivial style consistency change
VMware, Inc [Thu, 18 Nov 2010 22:56:41 +0000 (14:56 -0800)] 
lib/log: trivial style consistency change

Make the ifdefs the same style throughout the file.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agofix guestd crashes when Solaris GOS has vlan/vmxnet3 nic configured.
VMware, Inc [Thu, 18 Nov 2010 22:56:00 +0000 (14:56 -0800)] 
fix guestd crashes when Solaris GOS has vlan/vmxnet3 nic configured.

For the vlan/vmxnet3 interface, libdnet return its link address type as ADDR_TYPE_NONE
and addr_ntoa converts it to NULL, which causes crash in ReadInterfaceDetails().

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:55:15 +0000 (14:55 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix minor memory leaks.
VMware, Inc [Thu, 18 Nov 2010 22:54:52 +0000 (14:54 -0800)] 
Fix minor memory leaks.

. release a reference to a timeout source so it's properly freed.
. in the HGFS channel handling code, only initialize the channel's
connection once, since the channel is a static struct. This avoid
allocating a second transport-specific connection object (in the
init() callback) which would then be leaked.

Note that the HGFS fix is, for now, just a fix for the leak. There
are more issues with the static channel approach and the current code: for
example, the first app calling HgfsServerManager_Unregister() will shut
down the channel, instead of the last one, since the channel itself is not
ref counted.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: trivial cleanup
VMware, Inc [Thu, 18 Nov 2010 22:54:20 +0000 (14:54 -0800)] 
lib/lock: trivial cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: clarify how condVars work
VMware, Inc [Thu, 18 Nov 2010 22:54:11 +0000 (14:54 -0800)] 
lib/lock: clarify how condVars work

MXUser condVar waits may return before the condition is signaled
or an explicit timeout occurs due to spurious wakeups. Make this
clear in the requirements and code itself. Fix the one place where
there was a dependency on the old implementation.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:53:57 +0000 (14:53 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMinor comment tweek; review comment
VMware, Inc [Thu, 18 Nov 2010 22:53:26 +0000 (14:53 -0800)] 
Minor comment tweek; review comment

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: code barriers to deal with spurious wakeups
VMware, Inc [Thu, 18 Nov 2010 22:53:14 +0000 (14:53 -0800)] 
lib/lock: code barriers to deal with spurious wakeups

A condVar wait may be subject to a spurious wakeup; code against
this.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:53:04 +0000 (14:53 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Thu, 18 Nov 2010 22:48:51 +0000 (14:48 -0800)] 
Internal branch sync. Included in this change:

. VIX: handle oversize ListProcess results

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity/X11: Initialize host:guest desktop mappings before use.
VMware, Inc [Thu, 18 Nov 2010 22:42:05 +0000 (14:42 -0800)] 
Unity/X11: Initialize host:guest desktop mappings before use.

As written there existed a race between entering Unity and receipt
of the host's desired desktop layout such that certain guest X11
events lead to accessing random, uninitialized memory and consequently
receiving ye olde SIGSEGV.

This change works around the issue* by initializing the host:guest
virtual desktop maps based on the guest's current configuration.  That
is, if the guest had 8 desktops, we'll just create an identity mapping
of 8 desktops where desktop 0 in the guest is desktop 0 in the host,
guest1 = host1, and so on.

* Other things should be considered more fully later, such as not even
  registering for events until the host UI issues -ALL- initialization
  RPCs.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoProhibit use of Atomic_Read64() and Atomic_Write64() on misaligned vars.
VMware, Inc [Thu, 18 Nov 2010 22:40:48 +0000 (14:40 -0800)] 
Prohibit use of Atomic_Read64() and Atomic_Write64() on misaligned vars.

This is necessary since the functions do not provide any atomicity
guarantees in the misaligned case.

Add new functions, Atomic_ReadUnaligned64() and Atomic_WriteUnaligned64(),
and use these instead.

For the time being this change applies just to the VMM.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:38:41 +0000 (14:38 -0800)] 
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 [Thu, 18 Nov 2010 22:38:11 +0000 (14:38 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmtoolsd: relax VMware hypervisor restriction.
VMware, Inc [Thu, 18 Nov 2010 22:37:39 +0000 (14:37 -0800)] 
vmtoolsd: relax VMware hypervisor restriction.

Allow vmtoolsd to run anywhere if not running one of the known Tools
services, or running in debug mode. Also ignore the plugin path not
existing if running in debug mode (so that we can easily run with just
a debug plugin driving everything).

This makes it easier to run vmtoolsd under valgrind, since valgrind
doesn't emulate our backdoor and the code always thinks we're not
running on VMware.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:35:34 +0000 (14:35 -0800)] 
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 [Thu, 18 Nov 2010 22:35:18 +0000 (14:35 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAddress some issues identified by Coverity.
VMware, Inc [Thu, 18 Nov 2010 22:33:49 +0000 (14:33 -0800)] 
Address some issues identified by Coverity.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoIntroduce VMCI Events for guest memory access
VMware, Inc [Thu, 18 Nov 2010 22:33:03 +0000 (14:33 -0800)] 
Introduce VMCI Events for guest memory access

For VMCI users in the vmx, we know generate events when access
to the guest memory changes, i.e., when bus mastering is
enabled/disabled. These events are available through the same
API as the VMCI Event API which is part of the VMCI kernel
API. The events are delivered synchronously, such that actions
can be taken at the point where memory access is
disabled/enabled. The events are delivered with the VMCI
device lock held - the same way that VMCI datagrams are
delivered, so any code that can run in a datagram callback
should be able to run in the event callback as well.

For HGFS, using VMCIEvent_Subscribe during initialization to
subscribe to the event VMCI_EVENT_MEM_ACCESS_OFF will provide
a synchronous callback to the HGFS vmx module whenever the
guest is soft reset or the VMCI driver is unloaded.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: trivial comment cleanup
VMware, Inc [Thu, 18 Nov 2010 22:32:26 +0000 (14:32 -0800)] 
lib/lock: trivial comment cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: commonize some code
VMware, Inc [Thu, 18 Nov 2010 22:30:55 +0000 (14:30 -0800)] 
lib/lock: commonize some code

Make better use of the available 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 [Thu, 18 Nov 2010 22:29:52 +0000 (14:29 -0800)] 
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 [Thu, 18 Nov 2010 22:29:17 +0000 (14:29 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoImprove cleanup handling in Unity & GHI code.
VMware, Inc [Thu, 18 Nov 2010 22:28:57 +0000 (14:28 -0800)] 
Improve cleanup handling in Unity & GHI code.

Allow cleanup to be called even if Init hasn't been called (or cleanup has already happened).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Thu, 18 Nov 2010 22:28:22 +0000 (14:28 -0800)] 
Internal branch sync. Included in this change:

. Fix incorrect MXUserNativeRWRelease read/write mode.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoOVT: a few build fixes.
VMware, Inc [Thu, 18 Nov 2010 22:18:04 +0000 (14:18 -0800)] 
OVT: a few build fixes.

. support ICU > 3.8 correctly (not just 3.8)
. clean up generated rpcgen files so "make distclean" works more like it
should.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoReorder the resolution/topology capability list.
VMware, Inc [Thu, 18 Nov 2010 22:17:46 +0000 (14:17 -0800)] 
Reorder the resolution/topology capability list.

Set the 'can do topolgy' ahead of the 'can do resolution' capability to
avoid a host side race condition.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: stylist commonality
VMware, Inc [Thu, 18 Nov 2010 22:17:18 +0000 (14:17 -0800)] 
lib/file: stylist commonality

Some code was moved from lib/log to lib/file. Make the code
stylistically identical to the rest of lib/file.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMove kmap outside of critical section in VMCIHost_GetUserMemory
VMware, Inc [Thu, 18 Nov 2010 22:16:50 +0000 (14:16 -0800)] 
Move kmap outside of critical section in VMCIHost_GetUserMemory

While calling get_user_pages, we grab
current->mm->mmap_sem. However, we do not need to hold on to
it while doing kmap, and since kmap may sleep, it seems like a
genuinely bad idea.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBring comments in backdoor_def.h up to date.
VMware, Inc [Thu, 18 Nov 2010 22:16:06 +0000 (14:16 -0800)] 
Bring comments in backdoor_def.h up to date.

Some of the backdoor commands have been commented in backdoor_def.h
indicating if they are devel only or if they are now unused.  I went
through the whole list and udpated the comments to match the current
code.  (I also lined up the numbers.)  No functional change.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: concentrate the MXUSER_DEBUG code
VMware, Inc [Thu, 18 Nov 2010 22:13:16 +0000 (14:13 -0800)] 
lib/lock: concentrate the MXUSER_DEBUG code

Group the debug code together, all under the same ifdefs.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:12:43 +0000 (14:12 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDon't unregister capabilities if they were never set.
VMware, Inc [Thu, 18 Nov 2010 22:12:13 +0000 (14:12 -0800)] 
Don't unregister capabilities if they were never set.

This avoid an issue where a second instance of vmtoolsd would fail to claim
the RPC channel to communicate with the VMX, shut down, and unregister all
capabilities in the process, which would overwrite the state set by the
existing instance of vmtoolsd.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/log: fix a spelling mistake
VMware, Inc [Thu, 18 Nov 2010 22:11:32 +0000 (14:11 -0800)] 
lib/log: fix a spelling mistake

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUse proper function to translate system error into a vix error.
VMware, Inc [Thu, 18 Nov 2010 22:11:20 +0000 (14:11 -0800)] 
Use proper function to translate system error into a vix error.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMove VMCI socket to connected state before sending attach
VMware, Inc [Thu, 18 Nov 2010 22:07:48 +0000 (14:07 -0800)] 
Move VMCI socket to connected state before sending attach

During VMCI Stream socket connect on Linux, the server side
sends an attach message before adding the pending socket to
the list of connected sockets. External control messages,e.g.,
a WROTE message, triggered by the attach message may arrive
and not find the (previously pending) socket in the list of
connected sockets, and therefore will direct the control
message to the parent socket which is still in the listening
state. In the case of READ/WROTE messages, this will cause the
listening socket to respond with a RST message.

The solution is to add the pending socket to the connected
socket list before sending attach message, since that will
queue incoming packets for the right socket.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:06:32 +0000 (14:06 -0800)] 
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 [Thu, 18 Nov 2010 22:06:05 +0000 (14:06 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAllow an intialization failure to fail the plugin load.
VMware, Inc [Thu, 18 Nov 2010 22:05:50 +0000 (14:05 -0800)] 
Allow an intialization failure to fail the plugin load.

Relocate the initialization code into an Initialize() method so that if it
fails it can return a clear status that the caller can act upon.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity/X11: Integrate WindowPathFactory.
VMware, Inc [Thu, 18 Nov 2010 22:05:26 +0000 (14:05 -0800)] 
Unity/X11: Integrate WindowPathFactory.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity/X11: Hack/convert from C to C++.
VMware, Inc [Thu, 18 Nov 2010 22:05:09 +0000 (14:05 -0800)] 
Unity/X11: Hack/convert from C to C++.

With the introduction of WindowPathFactory, the core Unity/X11 needs
to grok C++.  Here's a change that does that by renaming a bunch of
files followed by signedness and typecasting fixes.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGHI/X11: Add fixed menu item monitors.
VMware, Inc [Thu, 18 Nov 2010 22:04:15 +0000 (14:04 -0800)] 
GHI/X11: Add fixed menu item monitors.

This change adds a Gio::FileMonitor to watch over $HOME/.gtk-bookmarks
and connects a slot to Gtk::RecentMgr::signal_changed() to watch for
updates to the recent documents menu.

When an update is detected, the existing relevant submenu is purged
and repopulated.  Then the MenuItemManager emits its menusChanged
signal, alerting the GHI platform code of the change.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGHI/X11: Move "DetectDesktopEnv" to lib/xdg.
VMware, Inc [Thu, 18 Nov 2010 22:03:34 +0000 (14:03 -0800)] 
GHI/X11: Move "DetectDesktopEnv" to lib/xdg.

This takes the static deskeop environment detection logic out of lib/
ghIntegration and places it a shell script and wrapper in lib/xdg.
We'll now distribute with Tools a vmware-xdg-detect-de which contains
the "detectDE" routine used in many of Portland's xdg-* scripts.

Keeping this logic in a script has a few motivations:
1.  No D-Bus (or similar) dependency added to library code.
2.  Allows users to hack as time goes on in case any of the methods
currently employed stop working.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 22:01:08 +0000 (14:01 -0800)] 
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 [Thu, 18 Nov 2010 22:00:20 +0000 (14:00 -0800)] 
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 [Thu, 18 Nov 2010 21:59:51 +0000 (13:59 -0800)] 
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 [Thu, 18 Nov 2010 21:57:24 +0000 (13:57 -0800)] 
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 [Thu, 18 Nov 2010 21:56:46 +0000 (13:56 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove unused function declaration (trivial)
VMware, Inc [Thu, 18 Nov 2010 21:54:14 +0000 (13:54 -0800)] 
Remove unused function declaration (trivial)

HgfsServer_ProcessPacket no longer exists so removing.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGHI/X11: Fork, reinitialize environment when spawning applications.
VMware, Inc [Thu, 18 Nov 2010 21:53:48 +0000 (13:53 -0800)] 
GHI/X11: Fork, reinitialize environment when spawning applications.

Okay, new school GHI leaves a lot of heavy lifting to GLib, because
GLib is awesome.  Unfortunately, its GAppInfo launch handler,
g_app_info_launch, is slightly less awesome in that it doesn't take
an environment vector as an argument.  That makes me sad.

To work around this, I whipped up a wrapper function which does the
following:
- fork()
- reinitialize the environment using clearenv and putenv*
- g_app_info_launch
- Child exits 0 upon success, non-zero on failure.
- Parent blocks until child exits, using child's exit status to
determine success or failure.

* Sort of dirty, but it saves me a parsing step, since nativeEnviron
is composed of strings of key=val, and that's the format accepted by
putenv.  Conversely setenv takes the variable and value strings
separately.

I'm going to file a feature request bug against GIO and provide some
patches.  If accepted upstream, we'll be able to get rid of this
function.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: File_Rename becomes File_Move
VMware, Inc [Thu, 18 Nov 2010 21:51:55 +0000 (13:51 -0800)] 
lib/file: File_Rename becomes File_Move

The File_Rename function is really the equivalent of the
unix/Linux "mv" command - it may atomically rename or copy the
file. Unfortunately there is no nice way to know what actually
happened, as cleanup may be necessary upon failure. Fix this.

While we're at it, make the GetLastError/errno make sense.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity: Fix SetDesktopConfig handling.
VMware, Inc [Thu, 18 Nov 2010 21:50:06 +0000 (13:50 -0800)] 
Unity: Fix SetDesktopConfig handling.

The work which factored TCLO handling out of lib/unity introduced a
regression whereby Unity_SetDesktopConfig no longer updated the
unity.virtDesktopArray state variable.  This caused all subsequent
calls relating to virtual desktops, Unity_SetDesktopActive and
Unity_SetWindowDesktop, to fail.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 21:49:24 +0000 (13:49 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agodo not delete support tarballs in the guest vm-support script
VMware, Inc [Thu, 18 Nov 2010 21:44:12 +0000 (13:44 -0800)] 
do not delete support tarballs in the guest vm-support script

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoString updates.
VMware, Inc [Thu, 18 Nov 2010 21:43:43 +0000 (13:43 -0800)] 
String updates.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDisable the tools upgrade UI for non-admin guest users.
VMware, Inc [Thu, 18 Nov 2010 21:42:54 +0000 (13:42 -0800)] 
Disable the tools upgrade UI for non-admin guest users.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: ASSERTION failure during histogram collection
VMware, Inc [Thu, 18 Nov 2010 21:42:27 +0000 (13:42 -0800)] 
lib/lock: ASSERTION failure during histogram collection

When the acquisition or held time is *EXACTLY* 10 seconds, expressed
in nanoseconds, the MXUser histogram collection code ASSERTs. A
bound check wasn't quite right.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix build.
VMware, Inc [Thu, 18 Nov 2010 21:40:05 +0000 (13:40 -0800)] 
Fix build.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix typo.
VMware, Inc [Thu, 18 Nov 2010 21:39:44 +0000 (13:39 -0800)] 
Fix typo.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnref the default glib context when quitting.
VMware, Inc [Thu, 18 Nov 2010 21:39:23 +0000 (13:39 -0800)] 
Unref the default glib context when quitting.

After some digging, I found out why valgrind was complaining about
memory leaks: creating a main loop using the default glib GMainContext
creates an implicit reference to that context, that needs to be properly
freed. This way, all GSources attached to that context are properly
destroyed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGHI/X11: Add remaining Nautilus/GNOME Places links.
VMware, Inc [Thu, 18 Nov 2010 21:37:16 +0000 (13:37 -0800)] 
GHI/X11: Add remaining Nautilus/GNOME Places links.

This change adds the following "pseudo apps" to the fixed items menu:
- Computer
- Network
- Connect to Server...
- Search for Files...

All but "Connect to Server..." have regular .desktop files, so CTS now
has its own entry in the pseudo app table.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 21:36:46 +0000 (13:36 -0800)] 
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 [Thu, 18 Nov 2010 21:35:07 +0000 (13:35 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGHI/X11: Don't confuse Desktop, Documents pseudo apps.
VMware, Inc [Thu, 18 Nov 2010 21:33:09 +0000 (13:33 -0800)] 
GHI/X11: Don't confuse Desktop, Documents pseudo apps.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity/X11: Initialize fakeEvent before passing off for processing.
VMware, Inc [Thu, 18 Nov 2010 21:29:15 +0000 (13:29 -0800)] 
Unity/X11: Initialize fakeEvent before passing off for processing.

From bug 626112 update 8:
"During init when querying all windows, Unity/X11 enumerates all
windows' properties and passes the properties down to the property
event handler via fake property events. Without initializing to 0,
fakeEvent.xproperty.state may be set to "PropertyDelete", so code
lower in the stack may mistakenly think that windows' initial
properties are actually *removed* properties."

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: dump MXUser serial numbers
VMware, Inc [Thu, 18 Nov 2010 21:28:47 +0000 (13:28 -0800)] 
lib/lock: dump MXUser serial numbers

Each MXUser object has a serial number. Dump it when things
go bad to assist in debugging efforts.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: fix the build
VMware, Inc [Thu, 18 Nov 2010 21:27:42 +0000 (13:27 -0800)] 
lib/lock: fix the build

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: provide full control of statistics
VMware, Inc [Thu, 18 Nov 2010 21:27:25 +0000 (13:27 -0800)] 
lib/lock: provide full control of statistics

Allow the MXUser_Control functions to fully enable statistics on
exclusive, recursive and RW locks. This allows a developer to
enable statistics on a lock by lock basis should a study warrant it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: code move before change
VMware, Inc [Thu, 18 Nov 2010 21:26:24 +0000 (13:26 -0800)] 
lib/lock: code move before change

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: move some code around
VMware, Inc [Thu, 18 Nov 2010 21:26:13 +0000 (13:26 -0800)] 
lib/lock: move some code around

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 18 Nov 2010 21:23:23 +0000 (13:23 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoHgfs Over VMCI - Mac OSX. Synchronous.
VMware, Inc [Thu, 18 Nov 2010 21:22:40 +0000 (13:22 -0800)] 
Hgfs Over VMCI - Mac OSX. Synchronous.

This is resubmission of change that was backed out.
I have changed mostly channel switching logic that was broken. Now
we store the channel in every request so that we call free/allocate/send
of the same channel when global hgfs channel resets to some different
channel.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Thu, 18 Nov 2010 21:15:11 +0000 (13:15 -0800)] 
Internal branch sync. Included in this change:

. VIX: code refactoring to use the same parsing code for both requests and
  responses.

. vmxnet3: make Jumbo Frame support available in Solaris driver.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUpdating open-vm-tools version for release 2010.10.18-313025. 2010.10.18-313025
VMware, Inc [Tue, 19 Oct 2010 20:19:53 +0000 (13:19 -0700)] 
Updating open-vm-tools version for release 2010.10.18-313025.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoPer session capabilities
VMware, Inc [Tue, 19 Oct 2010 20:09:43 +0000 (13:09 -0700)] 
Per session capabilities

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, 19 Oct 2010 20:09:27 +0000 (13:09 -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, 19 Oct 2010 20:09:05 +0000 (13:09 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix unicode support in toolbox-cmd.
VMware, Inc [Tue, 19 Oct 2010 20:08:47 +0000 (13:08 -0700)] 
Fix unicode support in toolbox-cmd.

On Win32, use the wide-character entry point function, and convert the
command line arguments to UTF-8 on all platforms before using them.

Also make sure we use UTF8-friendly g_print everywhere, instead of printf.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: left in a line
VMware, Inc [Tue, 19 Oct 2010 20:08:20 +0000 (13:08 -0700)] 
lib/lock: left in a line

Remove unnecessary include breaking build

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/lock: MXUser statistics are available anytime
VMware, Inc [Tue, 19 Oct 2010 20:08:01 +0000 (13:08 -0700)] 
lib/lock: MXUser statistics are available anytime

All statistics memory and computation are dynamic - nothing is
done unless a lock has statistics enabled.

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