]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
15 years agoIntegrating fixes to unlocalized text in JP files.
VMware, Inc [Wed, 26 Jan 2011 02:08:01 +0000 (18:08 -0800)] 
Integrating fixes to unlocalized text in JP files.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoSupport dnd/fcp with gvfs/kio
VMware, Inc [Wed, 26 Jan 2011 02:07:25 +0000 (18:07 -0800)] 
Support dnd/fcp with gvfs/kio

This change implemented support for non-file scheme (smb, sftp ...)
for DnD/FCP. Because it needs some glib functions, some code has to be
repeated 4 times :(.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: remove static in inline function
VMware, Inc [Wed, 26 Jan 2011 02:06:59 +0000 (18:06 -0800)] 
lib/unicode: remove static in inline function

We're wasting space with an static in an inline function in the .h.
Relocate it to a safe location.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoCorrected typographical errors in file guard.
VMware, Inc [Wed, 26 Jan 2011 02:06:01 +0000 (18:06 -0800)] 
Corrected typographical errors in file guard.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agopowerOps: fix handling non-ascii power scripts on Ubuntu/Suse
VMware, Inc [Wed, 26 Jan 2011 02:05:25 +0000 (18:05 -0800)] 
powerOps: fix handling non-ascii power scripts on Ubuntu/Suse

If conversion of script name to current locale fails try using
original string (which should be UTF-8) and hope that shell
will understand it.

Note that conversions to system locale succeed on Fedora and RHEL
(which set G_BROKEN_FILENAMES=1) and fail on Open SUSE and Ubuntu
which expect everything to be pure UTF-8. Also Ubuntu is quite
funky because when I switched system language to Russian LANG in
terminals still was set as en_US.UTF-8; /etc/default/locale has
to be edited manually.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoopen-vm-tools: install catalogs in the right place.
VMware, Inc [Wed, 26 Jan 2011 02:05:14 +0000 (18:05 -0800)] 
open-vm-tools: install catalogs in the right place.

Add a script to help with the task since automake / POSIX make don't
really help much when your rules are anything other than super trivial.

Also rename / relocate the catalogs in open-vm-tools to follow the layout
in the perforce tree more closely.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoHandle VMCI device shutdown when clients are still attached.
VMware, Inc [Wed, 26 Jan 2011 02:04:35 +0000 (18:04 -0800)] 
Handle VMCI device shutdown when clients are still attached.

When Windows reboots/halts, it sends the VMCI device
a shutdown PnP event.  This event is sent even if the
device is still referenced.  Clients are supposed to
handle IRP_MJ_SHUTDOWN (or similar) and detach, but if
they don't, then it's possible for them to call us
after the device is gone, at which point we can
explode.

Fixed so that we gracefully handle this.  On a shutdown
event:

1) Fail VMCI handle creation from this point on, but
   allow other calls, so that handles can be closed.
2) Inform vsock that the device is going away.
3) VSock fails DGRAM/STREAM creation from this point on.
4) VSock informs all open sockets that the device
   is going away.  The sockets close their handles
   and their wait list is kicked so that they wakeup
   from recv() etc.
5) VSock closes the control channel.
6) VSock fails all creation calls from this point on,
   but allows other calls, so that sockets can be
   closed etc.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 26 Jan 2011 02:02:38 +0000 (18:02 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTBB: missed file for Linux kernel module reap
VMware, Inc [Wed, 26 Jan 2011 02:02:18 +0000 (18:02 -0800)] 
TBB: missed file for Linux kernel module reap

The vmblock build had references to skas1.c that
I missed.  (The symbol that skas1.c affects, VMW_SKAS_MMAP,
is not used in our modules.)

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoLimit VMCI queue pair memory to 128MB per device
VMware, Inc [Wed, 26 Jan 2011 02:01:59 +0000 (18:01 -0800)] 
Limit VMCI queue pair memory to 128MB per device

In the future, we will rewrite how the VMCI device allocates queue
pairs, so that they will be located "on the device" and be
exposed through the PCI address range.

We should be able to provide up to a maximum of 128MB queue
pair memory, so this change enforces that limit now.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix the build
VMware, Inc [Wed, 26 Jan 2011 02:01:28 +0000 (18:01 -0800)] 
Fix the build

Check in the other file too

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoCleanup some old Linux kernel code.
VMware, Inc [Wed, 26 Jan 2011 02:01:17 +0000 (18:01 -0800)] 
Cleanup some old Linux kernel code.

Briefly:
- VMW_HAVE_SK_WMEM_ALLOC wasn't even used.  skas1.c is
no longer needed
- Aggressive trimming of compat files.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/misc: explain clearly about thread name that are too long
VMware, Inc [Wed, 26 Jan 2011 02:00:38 +0000 (18:00 -0800)] 
lib/misc: explain clearly about thread name that are too long

Don't simply assert, help the developer.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix log error path.
VMware, Inc [Wed, 26 Jan 2011 02:00:10 +0000 (18:00 -0800)] 
Fix log error path.

I can't hit the crash, but the code looks pretty wrong. Call the right
function in the log error path.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUpdate VMCI guest files after internal code move.
VMware, Inc [Wed, 26 Jan 2011 02:00:01 +0000 (18:00 -0800)] 
Update VMCI guest files after internal code move.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix a crash in rpcin error handling.
VMware, Inc [Wed, 26 Jan 2011 01:59:43 +0000 (17:59 -0800)] 
Fix a crash in rpcin error handling.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 26 Jan 2011 01:58:59 +0000 (17:58 -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 [Wed, 26 Jan 2011 01:58:20 +0000 (17:58 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoToolbox GTK: use pixbufs instead of pixmaps
VMware, Inc [Wed, 26 Jan 2011 01:57:58 +0000 (17:57 -0800)] 
Toolbox GTK: use pixbufs instead of pixmaps

Function gdk_pixmap_colormap_create_from_xpm_d() is deprecated
and GTK/GDK documentation suggests using GdkPixbuf and
gdk_pixbuf_new_from_xpm_data() instead.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDnD of non-ascii-text fails from gedit
VMware, Inc [Wed, 26 Jan 2011 01:57:20 +0000 (17:57 -0800)] 
DnD of non-ascii-text fails from gedit

The reason is that in our acceptable target list, we did not put utf8
as most wanted target, and gedit just provided unicode (as string)
instead of utf8 string. The fix is to move utf8 to top of acceptable
drop target list.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoOverride regular gobject constructor (instead of "constructed" callback).
VMware, Inc [Wed, 26 Jan 2011 01:50:02 +0000 (17:50 -0800)] 
Override regular gobject constructor (instead of "constructed" callback).

It seems some older gobject libraries don't have the "constructed" callback.
So override the regular gobject constructor instead.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoClipboard gets cleared if pasting a file again
VMware, Inc [Wed, 26 Jan 2011 01:48:08 +0000 (17:48 -0800)] 
Clipboard gets cleared if pasting a file again

The reason for the bug is that we used to rely on ClipboardClear
signal to check if we are still the clipboard owner. But that signal
is not reliable, and some unexpected ClipboardClear signal may cause
us clearing clipboard data unexpectedly. The fix is to rely on our
own private format like other implementation did.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoopen-vm-tools: link libvmtools to librt.so on Linux.
VMware, Inc [Wed, 26 Jan 2011 01:47:49 +0000 (17:47 -0800)] 
open-vm-tools: link libvmtools to librt.so on Linux.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUpdates to translation catalogs.
VMware, Inc [Wed, 26 Jan 2011 01:47:36 +0000 (17:47 -0800)] 
Updates to translation catalogs.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix power script handling on non-UTF-8 locales
VMware, Inc [Wed, 26 Jan 2011 01:47:05 +0000 (17:47 -0800)] 
Fix power script handling on non-UTF-8 locales

Since we are not using script name retrieved from the config file
in glib file operations, but rather spawn a new process with it
as executable, we should convert the string to current (system)
locale, not glib filename representation.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: Reduce log noise
VMware, Inc [Wed, 26 Jan 2011 01:46:42 +0000 (17:46 -0800)] 
lib/file: Reduce log noise

I spotted this in a log file in the PR. It is possible for
one thread to open a lock file on POSIXen and by the time it
tries to stat the lock file another thread has already deleted
(unlinked) the file because it is stale. Had the other thread
not done this, the first aforementioned thread would have done
the unlink.

If this occurs, suppress an warning/error message; it's just
noise.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Wed, 26 Jan 2011 01:46:03 +0000 (17:46 -0800)] 
Internal branch sync. Included in this change:

. dnd: implement SrcCancel/DestCancel for DnD V4 (fixes issue with copying
  files when not needed).

. 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 [Wed, 26 Jan 2011 01:45:09 +0000 (17:45 -0800)] 
Internal branch sync. Included in this change:

. VIX: more solaris fixes.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTools Logging: fix overzealous redirecting to console on Windows
VMware, Inc [Wed, 26 Jan 2011 01:44:27 +0000 (17:44 -0800)] 
Tools Logging: fix overzealous redirecting to console on Windows

The change that introduced automatic redirect of standard output
and standard error streams to a console on Windows completely broke
use of "vmtoolsd --cmd <xxx>" in scripts: redirect to files stopped
working.

Change VMTools_AttachConsole() to check if stdout/stderr point to
an on-disk file or a pipe before redirecting them to CONOUT.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDnD: close connection to vmblock upon receiving SIGUSR1
VMware, Inc [Wed, 26 Jan 2011 01:44:14 +0000 (17:44 -0800)] 
DnD: close connection to vmblock upon receiving SIGUSR1

Our install scripts expect that vmusr process (on non-Windows
platforms) will close connection to vmblock service upon
receiving SIGUSR1 and will not reopen it until next restart.

Install USR1 handler in DnD/CP plugin; also move block handling
from CopyPasteDnDX11 class and instead create a inew singleton
class for managing block connection state.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmci: replace kernelStubs with driverLog.
VMware, Inc [Wed, 26 Jan 2011 01:43:57 +0000 (17:43 -0800)] 
vmci: replace kernelStubs with driverLog.

kernelStubs has been replaced with driverLog, which is
what we already use for the host driver.  Checked that
there are no missing symbols (for example, Panic).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoText copied from OO Calc is pasted as image
VMware, Inc [Wed, 26 Jan 2011 01:41:00 +0000 (17:41 -0800)] 
Text copied from OO Calc is pasted as image

The reason for the bug is that on Linux after we got image data, we did
not try to get other format of data like Windows implementation did. The
fix is to try to get other formats of data after we got image 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 [Wed, 26 Jan 2011 01:40:23 +0000 (17:40 -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 [Wed, 26 Jan 2011 01:39:58 +0000 (17:39 -0800)] 
Internal branch sync. Included in this change:

. updates to translation catalogs.

. VIX: fix some code to also compile for solaris.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoThe HGFS leaks session objects when disabling Shared Folders
VMware, Inc [Wed, 26 Jan 2011 01:37:27 +0000 (17:37 -0800)] 
The HGFS leaks session objects when disabling Shared Folders

The HGFS server session was referenced with the session create request
handler in response to a new session request call from the guest.
Unfortunately, since there is no corresponding destroy session
request from the guests so the HGFS server session will
not get destroyed due to this reference. Furthermore, there is more
work required for the handling of the disabling of Shared Folders
feature wrt to session support. This is also coming later on.

Also, once the channel is destroyed and disconnects from the
HGFS server in response to a UI disable command of the
shared folders feature, the HGFS server session is lost and
therefore leaked. Additional consequence of this is that any
open handles with that session also then remain open as they
will not be closed until the VMX process is destroyed.

Fix is to remove the session referencing from the create session and
destroy session handlers until session support is completed and
correctly handled.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Wed, 26 Jan 2011 01:37:03 +0000 (17:37 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoPrevent unexpected guest UI DragEnter
VMware, Inc [Wed, 26 Jan 2011 01:35:36 +0000 (17:35 -0800)] 
Prevent unexpected guest UI DragEnter

In some cases there may be some unexpected UI DragEnter after DnD
finished, which may disturb our state machine. With this change, guest
DragEnter is not allowed within 0.5 second after each DnD.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRewrite the ResolutionSet RandR12 code V2
VMware, Inc [Wed, 26 Jan 2011 01:34:43 +0000 (17:34 -0800)] 
Rewrite the ResolutionSet RandR12 code V2

The code was rewritten and added in a new file, resolutionRandR12.c. The rewrite addresses a number of issues:
1) The RandR12 code was never enabled if the server supported the VMwareCtrl extension.
2) If the RandR12 code was trivially enabled by moving the check for the VMwareCtrl extension, vmtoolsd would deadlock and freeze the X server.
This issue is still not fully investigated, though, but commented fixes in this changeset seems to work around it.
3) If the old RandR12 code was enabled together with the deadlock fixes, resolution wasn't set right. In fact mostly it wasn't set at all, perhaps due to races with
other resolutionset mechanisms. Typically the added autofit modes were never used.
4) Error checking and recovery in the old code was not very elaborate.
5) DPI calculation was incorrect since only the pixel dimensions of the first output were considered, and in that case only on resolution increases.
6) The rather long function made bugfixing and error recovery implementation hard. It's now split up.
Together with a minor change in the modesetting kernel these changes appears to remove the need for using VMWareCtrl with the vmwgfx driver, This has only
been tested with two monitors, though.

V2. Fix broken builds when NO_MULTIMON was set to 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 [Wed, 26 Jan 2011 01:34:10 +0000 (17:34 -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 [Wed, 26 Jan 2011 01:33:25 +0000 (17:33 -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 [Wed, 26 Jan 2011 01:32:55 +0000 (17:32 -0800)] 
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.12.19-339835. 2010.12.19-339835
VMware, Inc [Mon, 20 Dec 2010 22:33:10 +0000 (14:33 -0800)] 
Updating open-vm-tools version for release 2010.12.19-339835.

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 22:23:41 +0000 (14:23 -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 [Mon, 20 Dec 2010 22:23:29 +0000 (14:23 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmblock: do not open-code getname (linux)
VMware, Inc [Mon, 20 Dec 2010 22:23:13 +0000 (14:23 -0800)] 
vmblock: do not open-code getname (linux)

Now that the module is GPL-ed we do not have to re-implement
getname() in our module.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDelete VMCI discovery service.
VMware, Inc [Mon, 20 Dec 2010 22:22:35 +0000 (14:22 -0800)] 
Delete VMCI discovery service.

We keep threatening to remove it and then never do.
Executive Decision(TM) time.  Removed from all targets
and code deleted.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agotools: minor cleanups.
VMware, Inc [Mon, 20 Dec 2010 22:22:16 +0000 (14:22 -0800)] 
tools: minor cleanups.

. remove lib/conf; Conf_Load() was only used in one place for legacy reasons,
so move the code there.
. remove some unneeded files from open-vm-tools.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoGive checkvm some love.
VMware, Inc [Mon, 20 Dec 2010 22:21:55 +0000 (14:21 -0800)] 
Give checkvm some love.

Clean up our favorite useless app:
. use lib/backdoor and lib/checkvm instead of inline asm
. don't reimplement getopt on win32 since we already have it in lib/misc
. fix some code standard nits

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoutil.h: pick up review comments
VMware, Inc [Mon, 20 Dec 2010 22:21:37 +0000 (14:21 -0800)] 
util.h: pick up review comments

Review comments: a nice optimization

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

. VIX: don't truncate cmdline

. VIX: Convert process command lines and owners' names to UTF-8 in
  ListProcesses.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoutil: pick up review comments
VMware, Inc [Mon, 20 Dec 2010 22:18:35 +0000 (14:18 -0800)] 
util: pick up review comments

More review comments to pick up.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoutil.h: review comments
VMware, Inc [Mon, 20 Dec 2010 22:18:23 +0000 (14:18 -0800)] 
util.h: review comments

Tweek the previous change; improve correctness.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoimprove Util_BufferIsEmpty performance
VMware, Inc [Mon, 20 Dec 2010 22:18:13 +0000 (14:18 -0800)] 
improve Util_BufferIsEmpty performance

Use some better inlining...

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix log statement in HGFS server for Fusion hosts
VMware, Inc [Mon, 20 Dec 2010 22:17:51 +0000 (14:17 -0800)] 
Fix log statement in HGFS server for Fusion hosts

Log statement was using a string pointer after it was freed.

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 22:17:31 +0000 (14:17 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix conflicting Bool types when using X11.
VMware, Inc [Mon, 20 Dec 2010 22:17:15 +0000 (14:17 -0800)] 
Fix conflicting Bool types when using X11.

Some distributions'* X headers seem to cause conflicts that our current
checks weren't catching. It sucks that we have this conflicting type
name and that they are of different types in the first place, but what
are you gonna do...

Anyway, checking upstream's version of Xdefs.h, it seems to check for
_XTYPEDEF_BOOL when defining the type. So both check for that before
defining our type, and define it so that Xdefs.h won't try to re-define
it.

* See:
http://sourceforge.net/tracker/?func=detail&atid=989708&aid=3118268&group_id=204462

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoReplace an ASSERT with a debug message.
VMware, Inc [Mon, 20 Dec 2010 22:16:49 +0000 (14:16 -0800)] 
Replace an ASSERT with a debug message.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix Guest Hgfs server interface for multiple callers
VMware, Inc [Mon, 20 Dec 2010 22:15:43 +0000 (14:15 -0800)] 
Fix Guest Hgfs server interface for multiple callers

Code does not quite cope with multiple callers for the same process
which leads to memory leaks.

The guest channel uses two globals: a channel data object and a server
data object both are shared for all registered connections that use the
internal HGFS RPC. The channel data and server data objects are reference
counted, initialized on the first reference and torndown on the final
reference removal.

At some point in the future if a client requires its own private callback
which will call HGFS server, then the channel code will allocate a new
channel which will in turn get its own private HGFS server session.
Currently this is not supported.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: style match a few lines
VMware, Inc [Mon, 20 Dec 2010 22:14:59 +0000 (14:14 -0800)] 
lib/file: style match a few lines

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 22:14:10 +0000 (14:14 -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 [Mon, 20 Dec 2010 22:13:46 +0000 (14:13 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake VSOCK reset connection during connect on QP detach
VMware, Inc [Mon, 20 Dec 2010 22:13:22 +0000 (14:13 -0800)] 
Make VSOCK reset connection during connect on QP detach

If the peer of a stream connection detaches from an already
allocated queue pair while the connection state is still
"connecting", we should treat it as a reset. The peer may
detach for a number of reasons, the two primary ones are 1)
the VM got killed, 2) the QP busmem invalidation failed.

This case is already handled by the common code, but not the
linux specific implementation.

This change also resets the VMCI datagram handle allocated by
the stream sockets to VMCI_INVALID_HANDLE when it is
destroyed, since the validity of the handle is used to
determine whether we should call destroy on the handle when
the module is unloaded.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoHgfs Over VMCI. Asynchronous.
VMware, Inc [Mon, 20 Dec 2010 22:12:44 +0000 (14:12 -0800)] 
Hgfs Over VMCI. Asynchronous.

Start supporting Async operations on Hgfs over vmci for Mac.

- Right now when you suspend the VM, change vmx file to disable
vmci - it will correctly fallback to backdoor however it will
not upgrade to vmci when one is available since transport change
is only triggered when you see that current channel is not working.
This logic should go away when session change is implemented which
should detect change in session and restart detection of which channel
is available.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmblock: fix order of filesystem cleanup operations (linux)
VMware, Inc [Mon, 20 Dec 2010 22:11:36 +0000 (14:11 -0800)] 
vmblock: fix order of filesystem cleanup operations (linux)

We should not destroy kmem cache until after we successfully
unregistered the filesystem.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoToolbox-cmd: fix UOM for ballooning stats
VMware, Inc [Mon, 20 Dec 2010 22:11:12 +0000 (14:11 -0800)] 
Toolbox-cmd: fix UOM for ballooning stats

Amount of ballooned memory is measured in MB, not MHz.

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 22:10:54 +0000 (14:10 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoImplement LogV() in tools.
VMware, Inc [Mon, 20 Dec 2010 22:09:30 +0000 (14:09 -0800)] 
Implement LogV() in tools.

This allows apps that use the fancy new log-level aware functions in
lib/log to also link against vmtoolslib.

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 22:08:54 +0000 (14:08 -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 [Mon, 20 Dec 2010 22:08:20 +0000 (14:08 -0800)] 
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: remove unused file.
VMware, Inc [Mon, 20 Dec 2010 22:08:03 +0000 (14:08 -0800)] 
open-vm-tools: remove unused file.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmtoolsd: add a worker thread pool.
VMware, Inc [Mon, 20 Dec 2010 22:07:52 +0000 (14:07 -0800)] 
vmtoolsd: add a worker thread pool.

The thread pool allows both for pooled requests and for non-pooled
requests, where the pool just manages the thread lifecycle and makes
sure the task is notified of things such as service shutdown.

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 22:07:30 +0000 (14:07 -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 [Mon, 20 Dec 2010 22:07:07 +0000 (14:07 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoClean up from comments and code.
VMware, Inc [Mon, 20 Dec 2010 22:06:46 +0000 (14:06 -0800)] 
Clean up from comments and code.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTear down file transfer object if init called multiple times.
VMware, Inc [Mon, 20 Dec 2010 22:05:51 +0000 (14:05 -0800)] 
Tear down file transfer object if init called multiple times.

GuestDnDCPMgr persists during the lifetime of the guest/plugin.
But we may be initialized multiple times during that lifetime via
Init() call. Init() should release any previous file transfer
object and create a new one each time it is invoked.

Also added code to cleanup the CopyPasteDnDWrapper singleton on
receiving shutdown signal from vmusr. Though I am not seeing that
signal at all either on Windows (tried setting bp in windbg) or
Linux. So, when the process exits, we will likely still have one
dangling init call.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoHost part of directory change notification.
VMware, Inc [Mon, 20 Dec 2010 22:05:30 +0000 (14:05 -0800)] 
Host part of directory change notification.

Initial implementation of directory change notification support for Mac OS.

1. Parse set notification watch request from the guest and pass it
down to platform specific library.
2. Parse remove change notification watch and call plaform specific library.
3. Call platform specific library when shared folder is being added/removed and
enumerate all shared folders during initialization.
4. Implement callback to send notifications back.
5. Integrated with Mac OS specific directory notification code.
6. Implemented prototype of change directory notification support for WIndows host.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmxnet: fix build break
VMware, Inc [Mon, 20 Dec 2010 22:04:19 +0000 (14:04 -0800)] 
vmxnet: fix build break

The previous change moved the definition of ETH_MIN_FRAME_LEN from
net.h to eth_public.h. I had followed through with the appropriate
refactoring in the vmkernel, but forgot to scour the rest of the
codebase for references, and missed one in the Linux build of
vmxnet.

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 22:02:53 +0000 (14:02 -0800)] 
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: fix compilation without ICU.
VMware, Inc [Mon, 20 Dec 2010 22:02:20 +0000 (14:02 -0800)] 
open-vm-tools: fix compilation without ICU.

Move functions that don't need ICU from codeset.c into a new file.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove unused user space support from VMCI guest drivers
VMware, Inc [Mon, 20 Dec 2010 22:00:03 +0000 (14:00 -0800)] 
Remove unused user space support from VMCI guest drivers

In ancient times, there existed a user level library for
VMCI. It talked to the VMCI guest driver through ioctls. Also,
it needed infrastructure in the guest driver to keep track
of user level processes and their datagram handles.

For all of the modules except windows, we should also be able
to get rid of the character device. I'll do that as a separate
change.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoClean up leftover references to VM_ASM_PLUS.
VMware, Inc [Mon, 20 Dec 2010 21:58:46 +0000 (13:58 -0800)] 
Clean up leftover references to VM_ASM_PLUS.

VM_ASM_PLUS was removed because it's always true now. This
change gets rid of a few leftover references in the 64-bit
code that were generating compiler warnings.

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:58:10 +0000 (13:58 -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: optimize/simplify Unicode_FindLastSubstrInRange
VMware, Inc [Mon, 20 Dec 2010 21:57:01 +0000 (13:57 -0800)] 
lib/unicode: optimize/simplify Unicode_FindLastSubstrInRange

It's a bit complex. Make the code faster and simpler.

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

Length in code points function description can be improved

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: stop using lengths in code units wherever possible
VMware, Inc [Mon, 20 Dec 2010 21:54:42 +0000 (13:54 -0800)] 
lib/unicode: stop using lengths in code units wherever possible

Most of the time code should be "thinking" in code points, not
code units.

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

Make a fussy compiler happy.

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

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: The last of the internal correctness fixes
VMware, Inc [Mon, 20 Dec 2010 21:53:24 +0000 (13:53 -0800)] 
lib/unicode: The last of the internal correctness fixes

Fix the last function. Add a code point length function. Remove
a now unused routine.

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

. VIX: try to use bash for starting processes on Solaris.

. VIX: escaping strings in XML VMAutomation responses.

. vmxnet: allow changing MAC address in FreeBSD.

. 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 [Mon, 20 Dec 2010 21:48:02 +0000 (13:48 -0800)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoUnity/X11: Free desktop mappings when exiting Unity.
VMware, Inc [Mon, 20 Dec 2010 21:47:42 +0000 (13:47 -0800)] 
Unity/X11: Free desktop mappings when exiting Unity.

When last hacking this code, I added two ASSERTs making sure that
the host:guest desktop map pointers were NULL when entering Unity
and numDesktops == 0.  This is true when first entering Unity
in a single session, but not for subsequent entrances in the same
session.

Rather than keep the mappings until the plugin is destroyed, we'll
now flush them upon exit.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTrivial: add some logging to trace events on detection window
VMware, Inc [Mon, 20 Dec 2010 21:47:08 +0000 (13:47 -0800)] 
Trivial: add some logging to trace events on detection window

Fairly low bandwidth logging of events occuring on detection window.
Also small tweeks to move positioning of button presses away from
border of window.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBump VMCI version on devel branch
VMware, Inc [Mon, 20 Dec 2010 21:46:53 +0000 (13:46 -0800)] 
Bump VMCI version on devel branch

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: simplify and improve Unicode_FindLastSubstrInRange
VMware, Inc [Mon, 20 Dec 2010 21:46:19 +0000 (13:46 -0800)] 
lib/unicode: simplify and improve Unicode_FindLastSubstrInRange

No need to be peeking under the hood at the physical implementation
in Unicode_FindLastSubstrInRange. This makes things much easier to
understand and removes possible problems with physical handling
issues

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/unicode: the bug fixing continues
VMware, Inc [Mon, 20 Dec 2010 21:46:10 +0000 (13:46 -0800)] 
lib/unicode: the bug fixing continues

Unicode_CompareRange does not need to pin it's indices; that's
done within Unicode_Substr.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAlign VMCI guest driver and library versions
VMware, Inc [Mon, 20 Dec 2010 21:45:28 +0000 (13:45 -0800)] 
Align VMCI guest driver and library versions

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

Continuing the lib/unicode bug hunt, Unicode_ReplaceRange gets fixed.
Make Unicode_Join not use Unicode_Append so there is no potential
recursion problems between routines.

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

There is a confusion of code points and code units within lib/unicode
that needs to be cleaned up. Here I fix Unicode_Substr using the
technique I plan to use across most of the function in
unicodeSimpleOperations.c.

More changes will ensue until the base PR is fixed.

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