From: Oliver Kurth Date: Mon, 8 Jan 2018 21:05:27 +0000 (-0800) Subject: even out remaining differences from stable-10.2.x X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c0cc53753b93fe7230ba339e898e1c15a067a05;p=thirdparty%2Fopen-vm-tools.git even out remaining differences from stable-10.2.x --- diff --git a/open-vm-tools/README b/open-vm-tools/README index f067f2b0a..45723b71a 100644 --- a/open-vm-tools/README +++ b/open-vm-tools/README @@ -1,6 +1,6 @@ Project information: -open-vm-tools +open-vm-tools 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 diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 3531a8c35..6ba126eed 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -650,9 +650,6 @@ fi else enable_caf=no fi -else - enable_caf=no -fi # # Check for CUnit and disable test code if not available. diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c index 44b5e8390..13908679b 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -1980,8 +1980,6 @@ AsyncTCPSocketConnect(struct sockaddr_storage *addr, // IN } - 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 @@ -4426,17 +4424,6 @@ AsyncTCPSocketClose(AsyncSocket *base) // IN } } - /* 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 @@ -5495,9 +5482,6 @@ AsyncTCPSocketSslAcceptCallback(void *clientData) // IN /* 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); @@ -5936,45 +5920,3 @@ AsyncTCPSocketListenerError(int error, // IN 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 diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h index 7982a52c0..524147ea9 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -663,20 +663,6 @@ int AsyncSocket_SetCloseOptions(AsyncSocket *asock, 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. */ diff --git a/open-vm-tools/lib/include/productState.h b/open-vm-tools/lib/include/productState.h index e4ed2f1d8..327a33f05 100644 --- a/open-vm-tools/lib/include/productState.h +++ b/open-vm-tools/lib/include/productState.h @@ -106,9 +106,6 @@ void ProductState_SetConfigName(const char *configName); 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); diff --git a/open-vm-tools/lib/include/x86cpuid.h b/open-vm-tools/lib/include/x86cpuid.h index 7731ba9af..596664ffd 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -1800,8 +1800,6 @@ CPUID_MODEL_IS_IVYBRIDGE(uint32 v) // IN: %eax from CPUID with %eax=1. } - - static INLINE Bool CPUID_MODEL_IS_KNIGHTS_LANDING(uint32 v) // IN: %eax from CPUID with %eax=1. { diff --git a/open-vm-tools/lib/misc/strutil.c b/open-vm-tools/lib/misc/strutil.c index 6b5dabfe6..27f230bd1 100644 --- a/open-vm-tools/lib/misc/strutil.c +++ b/open-vm-tools/lib/misc/strutil.c @@ -67,31 +67,6 @@ StrUtil_IsEmpty(const char *str) // IN: } #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 - /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c index e818e1c17..818e61e72 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c @@ -644,10 +644,6 @@ ReadInterfaceDetails(const struct intf_entry *entry, // IN return 0; } -#endif // !NO_DNET - - -#ifdef USE_RESOLVE /* ****************************************************************************** diff --git a/open-vm-tools/lib/syncDriver/syncDriverLinux.c b/open-vm-tools/lib/syncDriver/syncDriverLinux.c index 3671c9aaa..db042da4f 100644 --- a/open-vm-tools/lib/syncDriver/syncDriverLinux.c +++ b/open-vm-tools/lib/syncDriver/syncDriverLinux.c @@ -189,11 +189,6 @@ LinuxDriver_Freeze(const GSList *paths, */ 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 diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c index 9a86d92f5..023d41f11 100644 --- a/open-vm-tools/libDeployPkg/linuxDeployment.c +++ b/open-vm-tools/libDeployPkg/linuxDeployment.c @@ -1038,34 +1038,6 @@ CopyFileToDirectory(const char* srcPath, const char* destPath, //...................................................................................... -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; -} - /** *---------------------------------------------------------------------------- * @@ -1170,12 +1142,6 @@ Deploy(const char* packageName) 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 diff --git a/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c b/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c deleted file mode 100644 index a543cc13e..000000000 --- a/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c +++ /dev/null @@ -1,53 +0,0 @@ -/********************************************************* - * 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 -#include -#include - -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 diff --git a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c index 9eed761e8..e0cf2c5ab 100644 --- a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c +++ b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c @@ -103,23 +103,16 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, 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; @@ -132,16 +125,7 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, 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; @@ -170,23 +154,17 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, 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;