]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Mon, 26 Jul 2010 18:42:31 +0000 (11:42 -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: add a basic barrier test
VMware, Inc [Mon, 26 Jul 2010 18:42:00 +0000 (11:42 -0700)] 
lib/lock: add a basic barrier test

Also formally initialize a field instead of depending on the calloc.
The more obvious way will make things easier to understand.

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

I had this code lying around and decided it doesn't hurt to have it
around.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agovmblock: Kill stubs.h, use vm_assert.h. Ditch obj build => INVARIANTS for FreeBSD.
VMware, Inc [Mon, 26 Jul 2010 18:40:45 +0000 (11:40 -0700)] 
vmblock: Kill stubs.h, use vm_assert.h.  Ditch obj build => INVARIANTS for FreeBSD.

When I ported vmblock over to FreeBSD, I set things up such that
VMX86_DEVEL builds compiled kernel modules with two FreeBSD debugging
features, INVARIANTS and WITNESS, enabled.  These features require that
the kernel also be compiled with those options, else they won't load.
This isn't announced anywhere, and people were recently bitten by it.

This change now wraps INVARIANTS & WITNESS inside another make variable,
EXTRA_FREEBSD_DEBUGGING.  Rather than use KASSERT, we'll simply rely on
the vm_assert.h approach which eventually leads to Panic (still provided
by stubs.c).  Stubs.h was removed due to the redefinition of Panic.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoCite PR 535343 as reason to keep disable-query-diskinfo option.
VMware, Inc [Mon, 26 Jul 2010 18:40:10 +0000 (11:40 -0700)] 
Cite PR 535343 as reason to keep disable-query-diskinfo option.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoGuestInfo: Use consistent function doc style, misc touchups.
VMware, Inc [Mon, 26 Jul 2010 18:39:13 +0000 (11:39 -0700)] 
GuestInfo: Use consistent function doc style, misc touchups.

- TCS callbacks moved to "TCS goodies" block near ToolsOnLoad.
- Retrofitted all functions with VMKAPI style doc blocks.
- Ditched the "custom delimiter" argument to SetGuestInfo since it wasn't used.
- Isolated "send uptime" behavior from the "set capabilities" callback handler.

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

Mostly integrating change 1073447 into the plugin, but I noticed another
old change for which I don't really know the original bug.

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

. vixUser plugin: remove lib/printer + minor cleanups to makefile.

. Remove SetPrinter functionality from vixUser plugin.

Code was removed from foundryToolsDaemon.c in change 957688.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agog_error -> NOT_REACHED().
VMware, Inc [Mon, 26 Jul 2010 18:37:35 +0000 (11:37 -0700)] 
g_error -> NOT_REACHED().

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoCrossport vmtoolsd changes from CS 980554 into vmcore-main.
VMware, Inc [Mon, 26 Jul 2010 18:37:07 +0000 (11:37 -0700)] 
Crossport vmtoolsd changes from CS 980554 into vmcore-main.

Make sure the main loop doesn't start if a plugin has signaled it
top stop during initialization, and avoid doing unnecessary plugin
initialization when a plugin requests the container to quit.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMinor cleanups.
VMware, Inc [Mon, 26 Jul 2010 18:35:47 +0000 (11:35 -0700)] 
Minor cleanups.

. remove function typedefs from message.h (they're not used anywhere).
. remove function declarations from vixTools.h (functions don't exist).
. remove socketMgr.h (not included by anyone anymore).
. remove stale GuestInfo_GetSystemBitness prototype.
. remove RpcIn_restart() (not used anywhere).

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

Add the new library, and link the executables that need it to it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoModify the gtk toolbox to use vmtoolslib's logging backend.
VMware, Inc [Mon, 26 Jul 2010 18:33:08 +0000 (11:33 -0700)] 
Modify the gtk toolbox to use vmtoolslib's logging backend.

It can't link directly to the shared library (different rpcin
implementation needed), so just recompile the needed file.

This removes more calls to Debug_* functions in preparation for
retiring vmware-user.

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:32:09 +0000 (11:32 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

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

. vmtoolsLog.c includes a change that disables the VMX logger when not building with RpcChannel support.

. Add support for Unity options to tools core services framework.

Add definitions for the Unity plugin options.
Add code to the config file conversion (from old to new style) to convert
the Unity options.

. Set MAX_SIGNALS to NSIG (not NSIG - 1).

On FreeBSD (at least), NSIG is the number of the last signal.
Which makes sense since the signal numbers start at 1.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoShow folder icon when dragging directories
VMware, Inc [Mon, 26 Jul 2010 18:30:04 +0000 (11:30 -0700)] 
Show folder icon when dragging directories

When dragging a folder from the guest to the host we would show the wrong icon next to the cursor.

The problem was that there was no way to tell if dragged object was a file or a folder. Fix was to incldue file attributes with the drag information.

Note, this change only implements file attributes for Windows tools.

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:28:29 +0000 (11:28 -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: improve HashTable_Free comments
VMware, Inc [Mon, 26 Jul 2010 18:27:45 +0000 (11:27 -0700)] 
lib/misc: improve HashTable_Free comments

Clearly spell out the difference between free and unsafe free.

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

The allowed usage from RW locks was not clearly spelled out in the
appropriate function headers.

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:26:19 +0000 (11:26 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

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

Again this is not needed on 2.6.9+ kernels.

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

Kernels 2.6.9 and newer have all required list handling routines.

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

Nothing from this file is needed on kernels 2.6.9 and above.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoAdd HashTable_FreeUnsafe to allow freeing of an atomic hash table
VMware, Inc [Mon, 26 Jul 2010 18:23:18 +0000 (11:23 -0700)] 
Add HashTable_FreeUnsafe to allow freeing of an atomic hash table

The MXUser read-write lock wants to free its hash table when the lcok
is destroyed, but HashTable_Free has an ASSERT that it cannot be
atomic.  Let's add another function HashTable_FreeUnsafe to allow
freeing of an atomic hash table, but the caller has to ensure that no
other thread may be accessing the hash table when it is being freed.

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

Nothing in this file is needed on post-2.6.9 kernels so we can
remove it.

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:21:37 +0000 (11:21 -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 18:19:38 +0000 (11:19 -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 18:18:25 +0000 (11:18 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix Tools build.
VMware, Inc [Mon, 26 Jul 2010 18:17:37 +0000 (11:17 -0700)] 
Fix Tools build.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoLock rank file cleanup
VMware, Inc [Mon, 26 Jul 2010 18:17:27 +0000 (11:17 -0700)] 
Lock rank file cleanup

1. Lock rank defines in vm_basic_defs.h move to a new file mutexRank.h.
2. Existing libMutexRank.h moves to mutexRankLib.h.
3. Fix includes in all files that needed it.

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:16:29 +0000 (11:16 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMake fallback from V4 to V3 proper.
VMware, Inc [Mon, 26 Jul 2010 18:15:51 +0000 (11:15 -0700)] 
Make fallback from V4 to V3 proper.

FAST_V4 no longer works on linux because it requires session
support and V4 headers. However, V3 fallback should have worked.
Some minor fixes to make V3 fallback work.

I have also changed KERN_DEBUG to KERN_WARNING, since most distros
will only print WARNING messages.

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:15:32 +0000 (11:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoImplement NTP style PLL time slewing
VMware, Inc [Mon, 26 Jul 2010 18:14:55 +0000 (11:14 -0700)] 
Implement NTP style PLL time slewing

This change extends tools time sync to use the core ideas (and
system call) from NTP's time synchronization algorithm.

I tested this using ATTS for these guests: SLES11-64, RHEL5.4-64,
RHEL4.8-32, WinXP-32, Win7-64.  All of the results describe are
ignoring time spikes caused by apparent time falling behind and
catching up (which are not expected to be corrected by tools
timesync).

* Win7-64 hit a bug in the testing framework.
* WinXP-32 looked good (but unchaged from before).
* RHEL4.8-32 looks good (I'm using a 1000Hz kernel using the TSC,
so the lost tick compensation bug hits very severely and thus
provides a good test case for timesync).
* SLES11-64: Stayed within 1.5ms (no data for before).
* RHEL5.4-64: Stayed within 300us (before change it was 25ms).

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:13:02 +0000 (11:13 -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 18:12:43 +0000 (11:12 -0700)] 
Internal branch sync. Included in this change:

. Implement vix and tools code for CreateTemp[File|Directory]InGuest.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoGuestInfo: Identify SLED as SLES.
VMware, Inc [Mon, 26 Jul 2010 18:12:01 +0000 (11:12 -0700)] 
GuestInfo: Identify SLED as SLES.

Per bug 572710 comment #8:

"With respect to running of a VM, we have decided that we do not need to
differentiate between SLES & SLED. So we offer only one selection for the two. I
think in the future, the UI will begin to call it 'SLE' in most cases."

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: report MXUserSemaphore timed wait success/failure
VMware, Inc [Mon, 26 Jul 2010 18:11:20 +0000 (11:11 -0700)] 
lib/lock: report MXUserSemaphore timed wait success/failure

Only successes were being reported for statistics. We can now
properly handle success and failure reporting.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: improved MXUser acquisition statistics
VMware, Inc [Mon, 26 Jul 2010 18:09:20 +0000 (11:09 -0700)] 
lib/lock: improved MXUser acquisition statistics

We can now see the data from try operations (including timed ones)
and semaphores.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: minor preper work before statistic upgrade
VMware, Inc [Mon, 26 Jul 2010 18:08:53 +0000 (11:08 -0700)] 
lib/lock: minor preper work before statistic upgrade

Minor internals changes to prepare for collecting improved
MXUser acquisition statistics.

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:08:24 +0000 (11:08 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: pick up some review comments
VMware, Inc [Mon, 26 Jul 2010 18:07:38 +0000 (11:07 -0700)] 
lib/file: pick up some review comments

Simplify the code a bit by doing an st_dev check first.
This will avoid statfs whenever possible

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:06:58 +0000 (11:06 -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 18:05:52 +0000 (11:05 -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 18:05:23 +0000 (11:05 -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: MXUserSemaphore stats on TimedDown
VMware, Inc [Mon, 26 Jul 2010 18:04:26 +0000 (11:04 -0700)] 
lib/lock: MXUserSemaphore stats on TimedDown

Report more statistics. Clean up TryAcquire for Excl and Rec locks.

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

Capture MXUserSemaphore statistics.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix some lib/user stubs to address various breakages.
VMware, Inc [Mon, 26 Jul 2010 18:03:03 +0000 (11:03 -0700)] 
Fix some lib/user stubs to address various breakages.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove unneeded compatibility definitions from compat_sock.h
VMware, Inc [Mon, 26 Jul 2010 18:02:19 +0000 (11:02 -0700)] 
Remove unneeded compatibility definitions from compat_sock.h

Now that the cutoff for non-legacy modules is 2.6.9 we can cleanup
our sources a bit.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRank the lib/log lock
VMware, Inc [Mon, 26 Jul 2010 18:02:09 +0000 (11:02 -0700)] 
Rank the lib/log lock

This was a toughie. The problem here is that everyone calls Log(), Warning(), and the like while holding their own locks, yet LogWriteLogFile() calls a great deal of code itself while processing those calls. Some of this code is high-level and either already takes its own lock or is scheduled to get locking.

We considered several radical solutions, but none of them seemed satisfactory. We could have LogWriteLogFile() simply dump messages on a leaf-lock-protected queue and return, but then we'd have to create a lazy-writer logging thread. We could have LogWriteLogFile() not do complicated stuff like log file rotation itself, but schedule that for later, but again we'd have to invent a lazy mechanism (either a thread or callbacks provided by the log module initializer). And so on.

I settled on a practical solution: coming up with criteria for code that can be called underneath the log lock, and then moving around code in log.c to make it so. The criteria, for now, are quite simple - no code that LogWriteLogFile() calls under the log lock may take its own lock in turn. Basically this means stick with lib/misc and lib/file.

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:00:06 +0000 (11:00 -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 17:59:28 +0000 (10:59 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoUse inline asm in Atomic_Read64.
VMware, Inc [Mon, 26 Jul 2010 17:58:43 +0000 (10:58 -0700)] 
Use inline asm in Atomic_Read64.

As a reaction to the issue encountered with Atomic_Write64 (PR
541793), there's been a request to use inline asm in Atomic_Read64
as well.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix the build
VMware, Inc [Mon, 26 Jul 2010 17:58:01 +0000 (10:58 -0700)] 
Fix the build

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: got native
VMware, Inc [Mon, 26 Jul 2010 17:57:47 +0000 (10:57 -0700)] 
lib/lock: got native

Remove all usage of the VThreadID data type from MXUser. This
includes calling VThread_CurID. This prevents a host of chicken
before the egg problems that are wrapped around vthreadBase.c.

In order to do this two APIs had to change:

1) The per thread contention statistics had to be removed.

This is a loss since there are no tools that were interested
in the data.

2) MXUser_AnyLocksHeld

Changed so a VThreadID wasn't coming in. Trivial. It's
MXUser_IsCurThreadHoldingLocks now.

The check across everything thread case isn't necessary.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChange how topology is changed with the new vmwgfx X driver
VMware, Inc [Mon, 26 Jul 2010 17:57:18 +0000 (10:57 -0700)] 
Change how topology is changed with the new vmwgfx X driver

Multimon has always been a bit tricky to get to stick when running
a gnome-session since after we turned on multimon gnome would turn the
new output off.

This along with changes to the kernel driver and X driver fixes this.

So now the driver exports the vmware ctrl protocol and RandR1.2 and
expects vmware-user to first the set the topology via the vmware ctrl
and then setup the correct layout via RandR1.2. This is closer to what
the old path did but instead of just setting a single mode that covers
the whole topology it setups the layout as well.

The changes to the kernel driver and X driver will follow.

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

. Updated Tools version.

. GHI: Replace some XDR used in the platform layer with native types.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoImplement Vix code and Tools code for Move[File|Directory]InGuest guest operation.
VMware, Inc [Mon, 26 Jul 2010 17:56:23 +0000 (10:56 -0700)] 
Implement Vix code and Tools code for Move[File|Directory]InGuest guest operation.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agofree -> g_free when freeing glib allocated string.
VMware, Inc [Mon, 26 Jul 2010 17:54:25 +0000 (10:54 -0700)] 
free -> g_free when freeing glib allocated string.

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 17:51:09 +0000 (10:51 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix vmxnet and vmxnet3 compilation for Linux kernel 2.6.34
VMware, Inc [Mon, 26 Jul 2010 17:50:38 +0000 (10:50 -0700)] 
Fix vmxnet and vmxnet3 compilation for Linux kernel 2.6.34

APIs to access multicast address list in netdev has changed. Use the
new one.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoUpdating open-vm-tools version for release 2010.06.16-268169. 2010.06.16-268169
VMware, Inc [Thu, 17 Jun 2010 23:02:34 +0000 (16:02 -0700)] 
Updating open-vm-tools version for release 2010.06.16-268169.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoWiper: recognize HFS partitions, also FAT partitions mounted as 'msdos'
VMware, Inc [Thu, 17 Jun 2010 22:39:59 +0000 (15:39 -0700)] 
Wiper: recognize HFS partitions, also FAT partitions mounted as 'msdos'

A user on the forums was asking about shrinking disks in Mac OS guests.
The command "vmware-tools-cli disk shrink /" currently shows an error:
"Partition / is not shrinkable".

This is because the wiper library does not recognize the mounted HFS
partitions as wipeable. This change recognizes the "hfs" type as a new
PARTITION_HFS value to support shrinking HFS partitions. It also maps
the "msdos" mount type to PARTITION_FAT to support shrinking FAT/FAT32
partitions on Mac OS guests.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: add ulSema.c to the tools build
VMware, Inc [Thu, 17 Jun 2010 22:39:44 +0000 (15:39 -0700)] 
lib/lock: add ulSema.c to the tools build

Keep open source tools source of lib/lock in sync with the
bora/lib version.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoInternal branch sync. Included in this change:
VMware, Inc [Thu, 17 Jun 2010 22:39:31 +0000 (15:39 -0700)] 
Internal branch sync. Included in this change:

. implement VIX ListFiles command.

. 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 [Thu, 17 Jun 2010 22:36:53 +0000 (15:36 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove VIX_COMMAND_SET_HANDLE_STATE.
VMware, Inc [Thu, 17 Jun 2010 22:36:35 +0000 (15:36 -0700)] 
Remove VIX_COMMAND_SET_HANDLE_STATE.

The code that implemented it in the Tools has been if-defed out
for years and the code in the VMX doesn't do anything.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: add userland counting semaphores
VMware, Inc [Thu, 17 Jun 2010 22:36:19 +0000 (15:36 -0700)] 
lib/lock: add userland counting semaphores

Add userland counting semaphores... just the basics.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 17 Jun 2010 22:36:05 +0000 (15:36 -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 [Thu, 17 Jun 2010 22:35:51 +0000 (15:35 -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 [Thu, 17 Jun 2010 22:35:36 +0000 (15:35 -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 [Thu, 17 Jun 2010 22:35:20 +0000 (15:35 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoMinor fixes for code review comments
VMware, Inc [Thu, 17 Jun 2010 22:34:59 +0000 (15:34 -0700)] 
Minor fixes for code review comments

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/lock: standardize the dump format
VMware, Inc [Thu, 17 Jun 2010 22:34:42 +0000 (15:34 -0700)] 
lib/lock: standardize the dump format

The format of the dump object format varied a bit between object
types. Fix this.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: make file locking a bit more efficient
VMware, Inc [Thu, 17 Jun 2010 22:33:41 +0000 (15:33 -0700)] 
lib/file: make file locking a bit more efficient

When locking a symbolic link the lock file should go "next" to
the symbolic link, not where the link points to. The old code
for dealing with this is overkill; performing unnecessary operations
to get the job done; improve this.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove VIX_COMMAND_[GET|SET|]_PROPERTY.
VMware, Inc [Thu, 17 Jun 2010 22:33:12 +0000 (15:33 -0700)] 
Remove VIX_COMMAND_[GET|SET|]_PROPERTY.

They are unused. The Tools does process GET_PROPERTY like
GET_TOOLS_STATE, but I couldn't find or remember a version of the
client library that sent a command with this op code for this
purpose.
Also, as a side benefit, remove the flag
VIX_COMMAND_GUEST_RETURNS_ENCODED_STRING, since no request message
sets this flag, and it is a left over remenant from the incorrect
assumption that GuestRPC couldn't handle binary data. This gives
an additional benefit since inspection suggests that there's a bug
in the VMX code for processing responses when this flag is set:
the response length is computed using the encoded string, not
the decoded string (causing random VMX memory to be sent in the
response).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFixing returned bytes in Linux write.
VMware, Inc [Thu, 17 Jun 2010 22:32:35 +0000 (15:32 -0700)] 
Fixing returned bytes in Linux write.

HGFS POSIX server does not return correct number of bytes written on
some platforms. Fixing it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoFix usleep() wrapper on Windows.
VMware, Inc [Thu, 17 Jun 2010 22:32:24 +0000 (15:32 -0700)] 
Fix usleep() wrapper on Windows.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 17 Jun 2010 22:32:14 +0000 (15:32 -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: trivial cleanup
VMware, Inc [Thu, 17 Jun 2010 22:31:56 +0000 (15:31 -0700)] 
lib/lock: trivial cleanup

Remove evil white space

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 17 Jun 2010 22:31:47 +0000 (15:31 -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 [Thu, 17 Jun 2010 22:31:25 +0000 (15:31 -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 [Thu, 17 Jun 2010 22:30:50 +0000 (15:30 -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: generalize the MXUserHeader
VMware, Inc [Thu, 17 Jun 2010 22:30:30 +0000 (15:30 -0700)] 
lib/lock: generalize the MXUserHeader

The header will be used for more than locks...

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agolib/file: a bit of cleanup before a change
VMware, Inc [Thu, 17 Jun 2010 22:29:48 +0000 (15:29 -0700)] 
lib/file: a bit of cleanup before a change

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove epoll.c and setnice.c compat autoconf modules
Marcelo Vanzin [Thu, 17 Jun 2010 22:28:29 +0000 (15:28 -0700)] 
Remove epoll.c and setnice.c compat autoconf modules

Now that the code does not use compat_set_user_nice() and
compat pollwait ocde we can clean up our makefiles and remove
epoll.c and setnice.c autoconf modules.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove Hostinfo_RawSystemTimerXX interfaces
VMware, Inc [Thu, 17 Jun 2010 22:20:10 +0000 (15:20 -0700)] 
Remove Hostinfo_RawSystemTimerXX interfaces

The RawSystemTimerXX interfaces used to be needed because the
SystemTimerXX interfaces could become reentrant and deadlock.
Since that time, we have changed SystemTimerXX implementations
(no deadlock) and no longer worry about the cost of the lock
(now host-native).  So just always use SystemTimerXX.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoSlay thread watchdog.
VMware, Inc [Thu, 17 Jun 2010 22:19:55 +0000 (15:19 -0700)] 
Slay thread watchdog.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoVSOCK: remove compat_sk_filter
VMware, Inc [Thu, 17 Jun 2010 22:18:39 +0000 (15:18 -0700)] 
VSOCK: remove compat_sk_filter

Filter interface has stabilized in the kernels that we do
support so we can clean up our code a bit.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoGet rid of compat_pollwait definitions.
VMware, Inc [Thu, 17 Jun 2010 22:18:24 +0000 (15:18 -0700)] 
Get rid of compat_pollwait definitions.

We do not support kernels that do not have epoll so we can clean code up
a bit. I'll remove autoconf/epoll.c in a subsequent change.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove compat_set_user_nice.
VMware, Inc [Thu, 17 Jun 2010 22:18:10 +0000 (15:18 -0700)] 
Remove compat_set_user_nice.

All kernels that we support have set_user_nice(), no need to keep
compat layer.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoRemove pre 2.6.9 compatibility code.
VMware, Inc [Thu, 17 Jun 2010 22:17:53 +0000 (15:17 -0700)] 
Remove pre 2.6.9 compatibility code.

We do not support pre-2.6.9 kernels anymore so no need to carry around
old compatibility cruft.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoReshuffle Hostinfo_SystemTimerNS
VMware, Inc [Thu, 17 Jun 2010 22:17:31 +0000 (15:17 -0700)] 
Reshuffle Hostinfo_SystemTimerNS

Core observation: the fallback is always gettimeofday(), but
each Posix-y OS has a (possible) monotonic timer.
So, restructure the code so we optionally try OS-specific
timers (which the optimizer can prune out cheaply) then fall
back to the slower microsecond timer.

With two OS-specific timers already present (Visor and Apple),
I'll do the work of adding the third (Posix's clock_gettime).
Note that I use a weak symbol trick to avoid either librt or
libdl dependencies; an app that links librt will get
ns-resolution and everything else falls back to ms-resolution
gettimeofday().

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoVSOCK: fix compile warning on RHEL 6
VMware, Inc [Thu, 17 Jun 2010 22:16:38 +0000 (15:16 -0700)] 
VSOCK: fix compile warning on RHEL 6

Compiling vsock on RHEL6 produces following warning:

/home/test/dyno/vsock-only/linux/af_vsock.c:333:
warning: initialization from incompatible pointer type

We tried dealing with it in CS 1017526, but RedHat backported the
change to 2.6.32 making our check that relied on kernel version
ineffective.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoLinux compat code: do not define KERNEL_VERSION macro
VMware, Inc [Thu, 17 Jun 2010 22:16:18 +0000 (15:16 -0700)] 
Linux compat code: do not define KERNEL_VERSION macro

KERNEL_VERSION exists in kernel sources since 2.1.90 so
if we can't find it that means environment is busted and
we better stop instead of defining it ourselves.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Thu, 17 Jun 2010 22:15:59 +0000 (15:15 -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 [Thu, 17 Jun 2010 22:15:40 +0000 (15:15 -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 [Thu, 17 Jun 2010 22:15:09 +0000 (15:15 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
16 years agovmmemctl: rework balloon initializtion code
VMware, Inc [Thu, 17 Jun 2010 22:14:45 +0000 (15:14 -0700)] 
vmmemctl: rework balloon initializtion code

Balloon initialization code is way too complicated for the kernel
driver code. Instead of implementing abstract "init", "cleanup" and
"timer" interfaces on every OS and having call chains like:

OS kernel module init code ->
Common balloon module init ->
OS_Init (os specific initialization code)
Creatie /proc, stats, etc
Balloon_Init (common balloon init code)
OS_TimerStart (start balloon thread)

do:

OS kernel module init
OS-specific initialization
Balloon_Init()
Start balloon thread
Create /proc, state, etc

which makes module initialization logic more clear in my opinion.

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