Project information:
-open-vm-tools <https://github.com/vmware/open-vm-tools>
+open-vm-tools <http://open-vm-tools.sourceforge.net/>
These are the release notes for the open-vm-tools. Read them carefully, as
they explain how to build this project for different platforms and various
else
enable_caf=no
fi
-else
- enable_caf=no
-fi
#
# Check for CUnit and disable test code if not available.
}
- ASSERT(internalConnectFn != NULL);
-
/*
* Call connect(), which can either succeed immediately or return an error
* indicating that the connection is in progress. In the latter case, we
}
}
- /* Flush output if requested via AsyncSocket_SetCloseOptions(). */
- if (asock->flushEnabledMaxWaitMsec &&
- asock->state == AsyncSocketConnected &&
- !asock->errorSeen) {
- int ret = AsyncSocket_Flush(asock, asock->flushEnabledMaxWaitMsec);
- if (ret != ASOCKERR_SUCCESS) {
- ASOCKWARN(asock, ("AsyncSocket_Flush failed: %s. Closing now.\n",
- AsyncSocket_Err2String(ret)));
- }
- }
-
/*
* Set the new state to closed, and then check the old state and do the
* right thing accordingly
/* Only set if poll callback is registered */
asock->sslPollFlags = 0;
- /* Only set if poll callback is registered */
- asock->sslPollFlags = 0;
-
sslOpCode = SSL_TryCompleteAccept(asock->sslSock);
if (sslOpCode > 0) {
(*asock->sslAcceptFn)(TRUE, BaseSocket(asock), asock->clientData);
AsyncSocketHandleError(s, error);
}
-
-
-#ifndef _WIN32
-/*
- *-----------------------------------------------------------------------------
- *
- * AsyncSocket_ListenSocketUDS --
- *
- * Listens on the specified unix domain socket, and accepts new socket
- * connections. Fires the connect callback with new AsyncSocket object for
- * each connection.
- *
- * Results:
- * New AsyncSocket in listening state or NULL on error
- *
- * Side effects:
- * Creates new Unix domain socket, binds and listens.
- *
- *-----------------------------------------------------------------------------
- */
-
-AsyncSocket *
-AsyncSocket_ListenSocketUDS(const char *pipeName, // IN
- AsyncSocketConnectFn connectFn, // IN
- void *clientData, // IN
- AsyncSocketPollParams *pollParams, // IN
- int *outError) // OUT
-{
- struct sockaddr_un addr;
-
- memset(&addr, 0, sizeof addr);
- addr.sun_family = AF_UNIX;
- Str_Strcpy(addr.sun_path, pipeName, sizeof addr.sun_path);
-
- Log(ASOCKPREFIX "creating new socket listening on %s\n", pipeName);
-
- return AsyncSocketListenImpl((struct sockaddr_storage *)&addr,
- sizeof addr,
- connectFn, clientData, pollParams, FALSE,
- FALSE, NULL, outError);
-}
-#endif
int flushEnabledMaxWaitMsec,
AsyncSocketCloseFn closeCb);
-/*
- * Set optional AsyncSocket_Close() behaviors.
- */
-void AsyncSocket_SetCloseOptions(AsyncSocket *asock,
- int flushEnabledMaxWaitMsec,
- AsyncSocketCloseCb closeCb);
-
-/*
- * Send websocket close frame.
- */
-int
-AsyncSocket_SendWebSocketCloseFrame(AsyncSocket *asock,
- uint16 closeStatus);
-
/*
* Close the connection and destroy the asock.
*/
void ProductState_SetHelp(Product helpProduct,
const char *helpVersion);
-void ProductState_SetHelp(Product helpProduct, const char *helpVersion);
-void ProductState_GetHelp(Product *helpProduct, const char **helpVersion);
-
char *ProductState_Serialize(ProductStateSerializationFlags flags);
ProductStateSerializationFlags ProductState_Deserialize(const char *state);
}
-
-
static INLINE Bool
CPUID_MODEL_IS_KNIGHTS_LANDING(uint32 v) // IN: %eax from CPUID with %eax=1.
{
}
#endif
-/*
- *-----------------------------------------------------------------------------
- *
- * StrUtil_IsEmpty --
- *
- * Test if a non-NULL string is empty.
- *
- * Results:
- * TRUE if the string has length 0, FALSE otherwise.
- *
- * Side effects:
- * None
- *
- *-----------------------------------------------------------------------------
- */
-
-#ifdef VMX86_DEBUG
-static INLINE Bool
-StrUtil_IsEmpty(const char *str) // IN:
-{
- ASSERT(str != NULL);
- return str[0] == '\0';
-}
-#endif
-
/*
*-----------------------------------------------------------------------------
*
return 0;
}
-#endif // !NO_DNET
-
-
-#ifdef USE_RESOLVE
/*
******************************************************************************
*/
VERIFY(paths != NULL);
- /*
- * Ensure we did not get an empty list
- */
- VERIFY(paths != NULL);
-
/*
* Iterate through the requested paths. If we get an error for the first
* path, and it's not EPERM, assume that the ioctls are not available in
//......................................................................................
-static bool
-CopyFileToDirectory(const char* srcPath, const char* destPath,
- const char* fileName)
-{
- char command[1024];
- int forkExecResult;
- snprintf(command, sizeof(command), "/bin/cp %s/%s %s/%s.tmp", srcPath,
- fileName, destPath, fileName);
- command[sizeof(command) - 1] = '\0';
- forkExecResult = ForkExecAndWaitCommand(command);
- if (forkExecResult != 0) {
- SetDeployError("Error while copying file %s: %s", fileName,
- strerror(errno));
- return false;
- }
- snprintf(command, sizeof(command), "/bin/mv -f %s/%s.tmp %s/%s", destPath,
- fileName, destPath, fileName);
- command[sizeof(command) - 1] = '\0';
-
- forkExecResult = ForkExecAndWaitCommand(command);
- if (forkExecResult != 0) {
- SetDeployError("Error while renaming temp file %s: %s", fileName,
- strerror(errno));
- return false;
- }
- return true;
-}
-
/**
*----------------------------------------------------------------------------
*
return DEPLOY_ERROR;
}
- tmpDirPath = mkdtemp((char *)Util_SafeStrdup(TMP_DIR_PATH_PATTERN));
- if (tmpDirPath == NULL) {
- SetDeployError("Error creating tmp dir: %s", strerror(errno));
- return DEPLOY_ERROR;
- }
-
sLog(log_info, "Reading cabinet file %s. \n", packageName);
// Get the command to execute
+++ /dev/null
-/*********************************************************
- * Copyright (C) 2016 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 and no later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *********************************************************/
-
-#include "compat_version.h"
-#include "compat_autoconf.h"
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && \
- LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
-
-#include <linux/fs.h>
-#include <linux/wait.h>
-#include <linux/sched.h>
-
-unsigned long test_bits;
-
-/*
- * After 3.17.0, wait_on_bit changed its interface to remove the action
- * callback argument and this was backported to some Linux kernel versions
- * such as 3.10 for the RHEL 7.3 version.
- *
- * This test will fail on a kernel with such a patch.
- */
-
-int test(void)
-{
-
- return wait_on_bit(&test_bits,
- 0,
- NULL,
- TASK_UNINTERRUPTIBLE);
-}
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
-#error "This test intentionally fails on 3.17.0 and newer kernels."
-#else
-/*
- * It must be older than 2.6.13 in which case we don't use the function.
- */
-#endif
mblk_t *mp)
{
int ret = 0;
- uint32_t start, stuff, value, flags;
-#if defined(OPEN_SOLARIS) || defined(SOL11)
- uint32_t lso_flag, mss;
-#endif
+ uint32_t start, stuff, value, flags, lso_flag, mss;
ol->om = VMXNET3_OM_NONE;
ol->hlen = 0;
ol->msscof = 0;
hcksum_retrieve(mp, NULL, NULL, &start, &stuff, NULL, &value, &flags);
-#if defined(OPEN_SOLARIS) || defined(SOL11)
mac_lso_get(mp, &mss, &lso_flag);
if (flags || lso_flag) {
-#else
- if (flags) {
-#endif
struct ether_vlan_header *eth = (void *) mp->b_rptr;
uint8_t ethLen;
VMXNET3_DEBUG(dp, 4, "flags=0x%x, ethLen=%u, start=%u, stuff=%u, value=%u\n",
flags, ethLen, start, stuff, value);
-#if defined(OPEN_SOLARIS) || defined(SOL11)
if (lso_flag & HW_LSO) {
-#else
- if (flags & HCK_PARTIALCKSUM) {
- ol->om = VMXNET3_OM_CSUM;
- ol->hlen = start + ethLen;
- ol->msscof = stuff + ethLen;
- }
- if (flags & HW_LSO) {
-#endif
mblk_t *mblk = mp;
uint8_t *ip, *tcp;
uint8_t ipLen, tcpLen;
ol->om = VMXNET3_OM_TSO;
ol->hlen = ethLen + ipLen + tcpLen;
-#if defined(OPEN_SOLARIS) || defined(SOL11)
ol->msscof = mss;
-#else
- /* OpenSolaris fills 'value' with the MSS but Solaris doesn't. */
- ol->msscof = DB_LSOMSS(mp);
-#endif
+
if (mblk != mp) {
ret = ol->hlen;
}
- }
-#if defined(OPEN_SOLARIS) || defined(SOL11)
- else if (flags & HCK_PARTIALCKSUM) {
+ } else if (flags & HCK_PARTIALCKSUM) {
ol->om = VMXNET3_OM_CSUM;
ol->hlen = start + ethLen;
ol->msscof = stuff + ethLen;
}
-#endif
+
}
return ret;