]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
15 years agoFix reading catalogs with Windows line breaks.
VMware, Inc [Sat, 28 May 2011 19:51:06 +0000 (12:51 -0700)] 
Fix reading catalogs with Windows line breaks.

lib/dict doesn't seem to like Windows line breaks, so fix the line breaks
to make it happy.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: review comments
VMware, Inc [Sat, 28 May 2011 19:50:53 +0000 (12:50 -0700)] 
lib/file: review comments

Missing one!

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: bad merge
VMware, Inc [Sat, 28 May 2011 19:50:42 +0000 (12:50 -0700)] 
lib/file: bad merge

I merge a change and dropped some code that needed to be there.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoNetware: Rust In Pieces
VMware, Inc [Sat, 28 May 2011 19:50:26 +0000 (12:50 -0700)] 
Netware: Rust In Pieces

We don't support Netware with this code base anymore so remove all
of the ifdefs and code associated with it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternalize the old "guest dict" code.
VMware, Inc [Sat, 28 May 2011 19:46:07 +0000 (12:46 -0700)] 
Internalize the old "guest dict" code.

It's currently only used when translating old config files. Internalize
it to the vmtools library, and trim some unused features of the code in
the process.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoresolution set: remove references to old "guest dict" code.
VMware, Inc [Sat, 28 May 2011 19:45:43 +0000 (12:45 -0700)] 
resolution set: remove references to old "guest dict" code.

In the process, re-organize the headers a little bit to avoid duplication
of code and definitions.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: fix builds
VMware, Inc [Sat, 28 May 2011 19:43:33 +0000 (12:43 -0700)] 
lib/file: fix builds

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: drop redundant code
VMware, Inc [Sat, 28 May 2011 19:42:31 +0000 (12:42 -0700)] 
lib/file: drop redundant code

The file locking code can use the FileIO functions and avoid
having custom implementations of several of its functions.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Sat, 28 May 2011 19:42:02 +0000 (12:42 -0700)] 
Internal branch sync. Included in this change:

. Fix unexpected file paste with KDE guest.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agounity: remove references to the old "guest dict".
VMware, Inc [Sat, 28 May 2011 19:39:35 +0000 (12:39 -0700)] 
unity: remove references to the old "guest dict".

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovm_basic_defs: Windows usleep incorrect
VMware, Inc [Sat, 28 May 2011 19:39:19 +0000 (12:39 -0700)] 
vm_basic_defs: Windows usleep incorrect

The POSIX/BSD usleep is an int function that returns 0 upon
success and -1 (with errno set) on error. The Windows Sleep()
primitive is "void" so always return success.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFixing setting hidden attribute for readonly files.
VMware, Inc [Sat, 28 May 2011 19:38:50 +0000 (12:38 -0700)] 
Fixing setting hidden attribute for readonly files.

Setting hidden attribute is translated into updating
extended attributes on Mac OS which requires write access
to the file. Changing temporarily file permissions to
allow such access and restore permissions back after updating
attribute.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Sat, 28 May 2011 19:38:28 +0000 (12:38 -0700)] 
Internal branch sync. Included in this change:

. Split the disk shrink toolbox command workflow into 2 separate steps,
  one for wiping the disk and another for performing the disk shrink
  operation only.

. 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 [Sat, 28 May 2011 19:34:15 +0000 (12:34 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovix plugin: cleanup internal headers.
VMware, Inc [Sat, 28 May 2011 19:33:52 +0000 (12:33 -0700)] 
vix plugin: cleanup internal headers.

Get rid of a few headers by consolidating things a bit.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Sat, 28 May 2011 19:33:32 +0000 (12:33 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix Posix's function for converting O_* open
VMware, Inc [Sat, 28 May 2011 19:32:57 +0000 (12:32 -0700)] 
Fix Posix's function for converting O_* open
flags to FILEIO_OPEN_* counterpart: O_RDONLY/O_WRONLY/O_RDWR
are not bits: O_RDONLY is 0, O_WRONLY is 1, and O_RDWR
is 2.  So O_RDONLY was always converted to nothing rather
than FILEIO_OPEN_READ.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBSD vsnprintf: POSIX compliance
VMware, Inc [Sat, 28 May 2011 19:31:42 +0000 (12:31 -0700)] 
BSD vsnprintf: POSIX compliance

BSD printf doesn't comply with the POSIX specification for "%e" output.
There should only be two digits of exponent until the exponent is
larger than 99.

E5   -> E05
E15  -> E15
E115 -> E115

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agotoolbox-cmd: read config so logging can be configured.
VMware, Inc [Sat, 28 May 2011 19:31:03 +0000 (12:31 -0700)] 
toolbox-cmd: read config so logging can be configured.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoVMCI device needs a limit on the datagram queue
VMware, Inc [Sat, 28 May 2011 19:30:48 +0000 (12:30 -0700)] 
VMCI device needs a limit on the datagram queue

It turns out that we've never put a limit on the number of
datagrams that can be queued in the device.  The perf test
keeps pushing datagrams, and with nobody reading them, the
queue in the VMX just keeps growing until we exhaust the
pagefile.

Added a limit in VMCI_QueueDatagram().  We use the same
limit we use elsewhere, which is 2 x DG_MAX, or ~128K, for
normal datagrams, and a higher limit for events (datagrams
sent from the VMX/event resource ID).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: introduce an internal robust FileIO_Create
VMware, Inc [Sat, 28 May 2011 19:29:47 +0000 (12:29 -0700)] 
lib/file: introduce an internal robust FileIO_Create

This will be used for some restructuring and code reduction.

Followup changes will:

a) Switch the file locking code to FileIO and drop a large amount
of support functions.

b) Switch the file/directory make temporary functions to use the
existing robust/retry functions. This will make Windows work
properly under stress.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove unused variables from vmhgfs modules.
VMware, Inc [Sat, 28 May 2011 19:29:16 +0000 (12:29 -0700)] 
Remove unused variables from vmhgfs modules.

When vmhgfs modules are compiled in a Fedora 15 VM, there were few
warnings about unused variables.

Made code changes to get rid of all unused variables to fix all the
warnings.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: modernize the header file
VMware, Inc [Sat, 28 May 2011 19:28:43 +0000 (12:28 -0700)] 
lib/file: modernize the header file

A few cleanups to the header file.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix ASSERT in string.cc:80
VMware, Inc [Sat, 28 May 2011 19:27:44 +0000 (12:27 -0700)] 
Fix ASSERT in string.cc:80

The reason for the bug is that we assume that there should be ending
NULL for any text clipboard, but for clipboard data from old guest
(win95/98), the text may be not NULL terminated, and caused problem.
The fix is to always attach NULL for any clipboard buffer.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: remove prototype of dead function
VMware, Inc [Sat, 28 May 2011 19:25:58 +0000 (12:25 -0700)] 
lib/file: remove prototype of dead function

Doesn't exist anymore.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: use portable numbers
VMware, Inc [Sat, 28 May 2011 19:25:13 +0000 (12:25 -0700)] 
lib/file: use portable numbers

Windows doesn't have all of the lovely symbolic values

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: fix a comment
VMware, Inc [Sat, 28 May 2011 19:24:46 +0000 (12:24 -0700)] 
lib/file: fix a comment

Refer to an existing function...

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: make robust mkdir more general
VMware, Inc [Sat, 28 May 2011 19:24:18 +0000 (12:24 -0700)] 
lib/file: make robust mkdir more general

Make the robust mkdir internal routine behave like the POSIX
system call. Later changes will pass other values for the mask.
The Windows code ignores it for now.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/guestapp: spring cleaning.
VMware, Inc [Sat, 28 May 2011 19:11:32 +0000 (12:11 -0700)] 
lib/guestapp: spring cleaning.

Clean up more stuff we don't use or don't need in lib/guestapp.

. OpenUrl goes the way of the dodo, along with the POSIX "find program" and
"set spawn env" functions. (The gtk toolbox is just dead code walking, so
it's changed to not call those functions.)
. that allows the platform-specific implementations to be removed, since
they're not needed.
. we don't support pre-2k Windows anymore in this code, so we can use the
bora/lib implementation of GuestApp_GetConfPath().
. other unreferenced functions are also removed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake vsock Linux module not have unused but set variables.
VMware, Inc [Sat, 28 May 2011 19:10:45 +0000 (12:10 -0700)] 
Make vsock Linux module not have unused but set variables.

Fedora 15 compiles modules with the -Wunused-but-set-variable
flag. This exposed some cases, where the vsock code would set
variables without using them. Fix those.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMake vmci linux module not have unused but set variables.
VMware, Inc [Sat, 28 May 2011 19:08:29 +0000 (12:08 -0700)] 
Make vmci linux module not have unused but set variables.

Fedora 15 compiles modules with the -Wunused-but-set-variable
flag. This exposed some cases, where the VMCI code would set
variables without using them. Fix those. Note that the unused
annotation only means potentially unused.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Sat, 28 May 2011 19:07:50 +0000 (12:07 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMiscelaneous cleanup of unused tools stuff.
VMware, Inc [Sat, 28 May 2011 19:07:30 +0000 (12:07 -0700)] 
Miscelaneous cleanup of unused tools stuff.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix VMCI doorbell index allocation
VMware, Inc [Sat, 28 May 2011 19:06:42 +0000 (12:06 -0700)] 
Fix VMCI doorbell index allocation

With the merging of the guest and host code, the code that
allocates a doorbell got shuffled around. This introduced a
bug, where a guest personality allocation of a doorbell will
register the index of a doorbell handle with the VMCI backend
before allocating it. This change moves the allocation of the
index up before it is registered with the backend. To avoid
generating callbacks before we know for sure that a given
doorbell has been successfully created (this can happen due to
index sharing), an active flag has been added to the doorbell
entry. This flag is set to true only after the creation of the
doorbell has been successfully completed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAdd some log wrappers to tools.
VMware, Inc [Sat, 28 May 2011 19:05:56 +0000 (12:05 -0700)] 
Add some log wrappers to tools.

Basically, add missing glib functionality (g_info()) and create versions
that automatically prepend the function name to log messages.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Sat, 28 May 2011 19:05:07 +0000 (12:05 -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 [Sat, 28 May 2011 19:04:37 +0000 (12:04 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix killProcess looking at dead processes' exit state.
VMware, Inc [Sat, 28 May 2011 19:03:33 +0000 (12:03 -0700)] 
Fix killProcess looking at dead processes' exit state.

It needs to also be sure the program is gone before rewriting
the error to be NO_SUCH_PROCESS.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDon't try to dump service state when main loop is not running.
VMware, Inc [Sat, 28 May 2011 19:02:01 +0000 (12:02 -0700)] 
Don't try to dump service state when main loop is not running.

There is a race during service startup, where some thread (e.g., the Win32
service control manager thread) may trigger the "dump service state" code
before all service state has been initialized.

Avoid that by only allowing state to be dumped while the service's main
loop is running, so that we know the state data is in a known state.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChanges in shared code that don't affect open-vm-tools functionality.
VMware, Inc [Sat, 28 May 2011 19:01:18 +0000 (12:01 -0700)] 
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 2011.04.25-402641. 2011.04.25-402641
VMware, Inc [Tue, 26 Apr 2011 21:35:09 +0000 (14:35 -0700)] 
Updating open-vm-tools version for release 2011.04.25-402641.

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, 26 Apr 2011 21:28:18 +0000 (14:28 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTranslation updates for JA.
VMware, Inc [Tue, 26 Apr 2011 21:28:01 +0000 (14:28 -0700)] 
Translation updates for JA.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: another include file missing
VMware, Inc [Tue, 26 Apr 2011 21:27:21 +0000 (14:27 -0700)] 
lib/file: another include file missing

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: fix the build
VMware, Inc [Tue, 26 Apr 2011 21:27:12 +0000 (14:27 -0700)] 
lib/file: fix the build

Drop a line in my last check in

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: prep change before fix
VMware, Inc [Tue, 26 Apr 2011 21:27:00 +0000 (14:27 -0700)] 
lib/file: prep change before fix

Move the "make temp" functions from file.c to fileTemp.c.
Once properly collected and under the same roof, further
considation, simplification and a fix can be done

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: prep change before overhaul
VMware, Inc [Tue, 26 Apr 2011 21:26:44 +0000 (14:26 -0700)] 
lib/file: prep change before overhaul

The "make temp" functions currently live in file.c and should
live in fileTemp.c. In order to move them, remove the Msg_*
stuff - this should be Log and Warning - and include the
work-around just added to ESX50. After this change and moving
the code to its proper place, a full fix for the worked-around
problem will be done.

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, 26 Apr 2011 21:26:14 +0000 (14:26 -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, 26 Apr 2011 21:25:56 +0000 (14:25 -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, 26 Apr 2011 21:23:05 +0000 (14:23 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBackout previous change.
VMware, Inc [Tue, 26 Apr 2011 21:22:47 +0000 (14:22 -0700)] 
Backout previous change.

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, 26 Apr 2011 21:22:22 +0000 (14:22 -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, 26 Apr 2011 21:21:29 +0000 (14:21 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: pretty up before a change
VMware, Inc [Tue, 26 Apr 2011 21:20:31 +0000 (14:20 -0700)] 
lib/file: pretty up before a change

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, 26 Apr 2011 21:20:13 +0000 (14:20 -0700)] 
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 [Tue, 26 Apr 2011 21:19:54 +0000 (14:19 -0700)] 
Internal branch sync. Included in this change:

. HGFS: return a proper error if the filename is too long.

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

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agovmblock-fuse: move over to /var/run/vmblock-fuse
VMware, Inc [Tue, 26 Apr 2011 21:17:21 +0000 (14:17 -0700)] 
vmblock-fuse: move over to /var/run/vmblock-fuse

Do not mount vmblock-fuse in /tmp as it may interfere with
services scanning /tmp, such as tmpwatch. Let's mount it
in /var/run/vmblock-fuse instead.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoDGRAM shutdown() on Linux has a bug where if the socket
VMware, Inc [Tue, 26 Apr 2011 21:15:50 +0000 (14:15 -0700)] 
DGRAM shutdown() on Linux has a bug where if the socket
is unconnected, it skips waking up the socket.  DGRAM sockets
are hardly ever connected, so this has been fixed.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoCall g_clear_error(&err) after g_locale_from_utf8() fails.
VMware, Inc [Tue, 26 Apr 2011 21:15:06 +0000 (14:15 -0700)] 
Call g_clear_error(&err) after g_locale_from_utf8() fails.

After catching an error from g_locale_from_utf8() the error structure
is not freed. This results in a warning from GLib when we later call
g_spawn_async() with the same (now populated) error parameter.

While we're in here copy the debug message from the Windows version of
PowerOpsScriptCallback() so that the exit code of the power script is
logged.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix bsd build for new inline assembly functions: use __asm__ instead of asm
VMware, Inc [Tue, 26 Apr 2011 21:14:49 +0000 (14:14 -0700)] 
Fix bsd build for new inline assembly functions: use __asm__ instead of asm
to satisfy C99 rules.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoOn running queuepairAllocTest24_l test on Ubuntu9 guest, the guest goes unresponsive
VMware, Inc [Tue, 26 Apr 2011 21:14:32 +0000 (14:14 -0700)] 
On running queuepairAllocTest24_l test on Ubuntu9 guest, the guest goes unresponsive

We try to allocate the queuepair pages before we make the hypercall (which would
eventually hit the restriction in the device).  On Windows and Mac OS, we can't
allocate a single contiguous block this big, so the allocation fails immediately.
On Linux, we allocate each page separately, so what happens is that the system
starts thrashing and becomes unresponsive.

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, 26 Apr 2011 21:13:54 +0000 (14:13 -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, 26 Apr 2011 21:13:07 +0000 (14:13 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTBB: really simplify stubbed Msg_AppendMsgList
VMware, Inc [Tue, 26 Apr 2011 21:12:18 +0000 (14:12 -0700)] 
TBB: really simplify stubbed Msg_AppendMsgList

This simplified version just prints MSGIDs.  I'll look
at the problem in more detail once Tinderbox is green again.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix Mac OS obj build
VMware, Inc [Tue, 26 Apr 2011 21:11:55 +0000 (14:11 -0700)] 
Fix Mac OS obj build

Name length is not a size_t here, it's a uint32.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoTBB in stub-user-msg.c
VMware, Inc [Tue, 26 Apr 2011 21:11:38 +0000 (14:11 -0700)] 
TBB in stub-user-msg.c

free() was not declared.  Yes, really.

Include stdlib.h to get it.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoBuild fix: Msg_AppendMsgList in tools
VMware, Inc [Tue, 26 Apr 2011 21:11:18 +0000 (14:11 -0700)] 
Build fix: Msg_AppendMsgList in tools

Missed the Tools Msg stub files.  dictionary.c now
uses Msg_AppendMsgList extensively, so need to add
to the stubs file too.

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, 26 Apr 2011 21:10:38 +0000 (14:10 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoHGFS Dir Read Part IV: Server changes for search read V4
VMware, Inc [Tue, 26 Apr 2011 21:10:13 +0000 (14:10 -0700)] 
HGFS Dir Read Part IV: Server changes for search read V4

Added search read V4 support to the HGFS server which can
return multiple directory entries as will fit in the reply
buffer or a single entry.

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, 26 Apr 2011 21:09:55 +0000 (14:09 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: BSD printf flubbs floating point output
VMware, Inc [Tue, 26 Apr 2011 21:09:29 +0000 (14:09 -0700)] 
lib/string: BSD printf flubbs floating point output

The BSD printf flubbs floating, especially when the number ends
with all zeros. The root problem is that one digit is printed
explicitly; any remaining digits need to be printed too - but
only if they aren't zero since the zero fill will take care of
them.

If there is only one digit, to print (e.g. 1.000) the calculation
handling the remaining digits comes up with -1 and, well, one gets
what they deserve.

The fix is easy - don't try to output a negative number of digits.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: cleanup before change
VMware, Inc [Tue, 26 Apr 2011 21:08:49 +0000 (14:08 -0700)] 
lib/string: cleanup before change

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: more cleanup
VMware, Inc [Tue, 26 Apr 2011 21:08:37 +0000 (14:08 -0700)] 
lib/string: more cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: more cleanup
VMware, Inc [Tue, 26 Apr 2011 21:08:19 +0000 (14:08 -0700)] 
lib/string: more cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: clean up before change
VMware, Inc [Tue, 26 Apr 2011 21:07:38 +0000 (14:07 -0700)] 
lib/string: clean up before change

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/string: more cleanup
VMware, Inc [Tue, 26 Apr 2011 21:07:02 +0000 (14:07 -0700)] 
lib/string: more cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/str: minor cleanup before change
VMware, Inc [Tue, 26 Apr 2011 21:06:45 +0000 (14:06 -0700)] 
lib/str: minor cleanup before change

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix ordering of HGFS opcode for search read V4 backwards compatibiliy
VMware, Inc [Tue, 26 Apr 2011 21:04:51 +0000 (14:04 -0700)] 
Fix ordering of HGFS opcode for search read V4 backwards compatibiliy

Since change notification is released as of Beta 1 the previous change
of inserting the search read opcode ahead of this will lead to
incompatibily for Beta 2 servers against Beta 1 tools.

Make the continuity seamless by keeping the change notification
opcode ahead of the search read V4. This means the HGFS server dispatch
handler must check for a NULL entry in its handler dispatch table now.
(Or we could put a dummy dispatch handler which always returns protocol
error, but I think NULL is okay.)
The change notification opcode is only for requests sent by the server
to the guest clients in response to a directory change event.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoReduce memcpy for data packets on VMCI requests
VMware, Inc [Tue, 26 Apr 2011 21:03:43 +0000 (14:03 -0700)] 
Reduce memcpy for data packets on VMCI requests

The get data packet routine would always do a copy of the guest
data into the memory allocated buffer even if the request was
for a writable memory buffer. So for V4 read and directory read
requests there was an unnecessary memcpy.

The reason for this was that the meta packet uses the same routine
but does need to read in the guest memory (for the request) but
needs to write the reply into the same memory. So instead I have
now added a third buffer access option to the READ and WRITE existing
ones: READ-WRITE. So now meta packets use the READ-WRITE and the
V4 read and directory read will use the WRITE option. The memcpy
to read the guest data is only performed for READ or READ-WRITE
buffer requests.

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, 26 Apr 2011 21:02:57 +0000 (14:02 -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, 26 Apr 2011 20:59:46 +0000 (13:59 -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, 26 Apr 2011 20:57:20 +0000 (13:57 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix comment in vmci_sockets.h
VMware, Inc [Tue, 26 Apr 2011 20:56:53 +0000 (13:56 -0700)] 
Fix comment in vmci_sockets.h

GetVersion -> Version.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoEnable logging by default in vmtoolsd.
VMware, Inc [Tue, 26 Apr 2011 20:56:41 +0000 (13:56 -0700)] 
Enable logging by default in vmtoolsd.

To ensure we get at least some logging by default, enable a default logger
that writes to syslog in vmtoolsd. The default log level ("message" on beta
builds, "warning" on release builds) is unchanged.

The change also makes "syslog" the default log handler for everybody,
in case a handler is not specified in the config data. (Previously, it
would be "stdout" on POSIX, or "outputdebugstring" on Win32.)

Also:
. reset the logging system after reading the command line args, so that
syslog can pick up the change in the container name.
. fix an issue in the POSIX syslogger; openlog() doesn't seem to make its
own copy of the "ident" argument, so it could end up referencing freed
memory as we reconfigure the log system. Keep a copy in the log data.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agorpcin: fix cleanup on error path.
VMware, Inc [Tue, 26 Apr 2011 20:55:47 +0000 (13:55 -0700)] 
rpcin: fix cleanup on error path.

We need to make sure we clean up the GSource on the error path too, so
that the main loop doesn't try to re-run the loop after an error (in
which case the channel will be NULL).

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix up vm-support-lx.
VMware, Inc [Tue, 26 Apr 2011 20:55:30 +0000 (13:55 -0700)] 
Fix up vm-support-lx.

. clean up indentation
. make it /bin/sh-friendly
. make it support FreeBSD and Solaris too
. stop packaging up /proc, which takes a long time and doesn't necessarily
help.
. don't follow symlinks (so that we don't package ICU data or plugins under
/etc/vmware-tools).
. package syslogs too.
. get rid of the spinning thing (progress "report") since it doesn't play
well with FreeBSD's/Solaris's /bin/echo.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoIncrease buffer size for OS name cache.
VMware, Inc [Tue, 26 Apr 2011 20:54:47 +0000 (13:54 -0700)] 
Increase buffer size for OS name cache.

Increase the scope of a previous fix to also cover long OS names, so
that guest info and vix have enough buffer space to cover the max
size supported by the hostinfo library.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoInternal branch sync. Included in this change:
VMware, Inc [Tue, 26 Apr 2011 20:53:42 +0000 (13:53 -0700)] 
Internal branch sync. Included in this change:

. Remove memcmp call from eth_public.h, to work around an issue found with
  newer GCC versions not including string.h.

. 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, 26 Apr 2011 20:48:03 +0000 (13:48 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoAdd API to query VMCI sockets driver version.
VMware, Inc [Tue, 26 Apr 2011 20:47:36 +0000 (13:47 -0700)] 
Add API to query VMCI sockets driver version.

VMCF asked for a way to determine the version of
the VMCISockets driver so that they can blacklist versions
that have issues.  This change introduces such an API.

The version is platform-dependent, like the VMCI
driver version, and uses the same format, A.B.C.D,
where A is an epoch, B the major version (incremented
per release branch), C the minor version (incremented
per change) and D is unused.  It is embedded in the
file vsock_version.h for each platform.

The API is exposed through a new call in vmci_sockets.h,
VMCISock_Version(), as an unsigned integer.  New macros
are provided to extract the A, B and C component parts
of the version.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoVMCI: add some missing newlines to the logging.
VMware, Inc [Tue, 26 Apr 2011 20:46:47 +0000 (13:46 -0700)] 
VMCI: add some missing newlines to the logging.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRecognize Debian 6.
VMware, Inc [Tue, 26 Apr 2011 20:46:05 +0000 (13:46 -0700)] 
Recognize Debian 6.

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, 26 Apr 2011 20:45:55 +0000 (13:45 -0700)] 
Changes in shared code that don't affect open-vm-tools functionality.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agolib/file: trivial cleanup
VMware, Inc [Tue, 26 Apr 2011 20:45:35 +0000 (13:45 -0700)] 
lib/file: trivial cleanup

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoRemove support URL from toolbox-cmd's help output.
VMware, Inc [Tue, 26 Apr 2011 20:44:03 +0000 (13:44 -0700)] 
Remove support URL from toolbox-cmd's help output.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoFix up HGFS server get packet buffer.
VMware, Inc [Tue, 26 Apr 2011 20:43:36 +0000 (13:43 -0700)] 
Fix up HGFS server get packet buffer.

When guest mappings were being released the start index for the IOV
array was not correct it started from zero instead of the startIndex.
For meta packet the start index is zero, but for data packets it
is 16.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChange error code of VMCIDoorbell_Create
VMware, Inc [Tue, 26 Apr 2011 20:43:13 +0000 (13:43 -0700)] 
Change error code of VMCIDoorbell_Create

Before the merging of the two VMCI drivers, the guest version
would return VMCI_ERROR_ALREADY_EXISTS when creating a
doorbell with a handle that already exists. The host code
actually returned VMCI_ERROR_DUPLICATE_ENTRY, which is the
hash table error code for duplicate entries. After the merge,
we always return VMCI_ERROR_DUPLICATE_ENTRY, but
VMCI_ERROR_ALREADY_EXISTS is slightly more descriptive so
return that instead.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoMore VMCI device state locking.
VMware, Inc [Tue, 26 Apr 2011 20:42:42 +0000 (13:42 -0700)] 
More VMCI device state locking.

An ASSERT could be hit where we were trying to read in a datagram
from the device but the device was not started (and so the
guest personality was not active).  It's actually okay to read
in at that time, so stop ASSERTING on the personality being
active.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agofix irq naming to match network convention
VMware, Inc [Tue, 26 Apr 2011 20:41:12 +0000 (13:41 -0700)] 
fix irq naming to match network convention

The vmxnet driver always requests irq with name of 'vmxnet' which is
incorrect. It causes multiple entries in /proc/interrupts and confuses
scripts like irqbalance that try and manage smp affinity on network
cards.

The fix is simple, just use the standard convention of putting device
name in the irq name. This applies to all kernel versions.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 years agoChange lib/file build order.
VMware, Inc [Tue, 26 Apr 2011 20:40:30 +0000 (13:40 -0700)] 
Change lib/file build order.

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