]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
even out remaining differences from stable-10.2.x
authorOliver Kurth <okurth@vmware.com>
Mon, 8 Jan 2018 21:05:27 +0000 (13:05 -0800)
committerOliver Kurth <okurth@vmware.com>
Mon, 8 Jan 2018 21:05:27 +0000 (13:05 -0800)
12 files changed:
open-vm-tools/README
open-vm-tools/configure.ac
open-vm-tools/lib/asyncsocket/asyncsocket.c
open-vm-tools/lib/include/asyncsocket.h
open-vm-tools/lib/include/productState.h
open-vm-tools/lib/include/x86cpuid.h
open-vm-tools/lib/misc/strutil.c
open-vm-tools/lib/nicInfo/nicInfoPosix.c
open-vm-tools/lib/syncDriver/syncDriverLinux.c
open-vm-tools/libDeployPkg/linuxDeployment.c
open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c [deleted file]
open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c

index f067f2b0a0b875d9ad52a04a76e8fe607248da1a..45723b71ae9fbe3f80f880ec6a35f6a433f48f85 100644 (file)
@@ -1,6 +1,6 @@
 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 
index 3531a8c3533a6d3c061d8859a56516469d3ed8b4..6ba126eedd170fa2fde21ae29170864ca0c33e9d 100644 (file)
@@ -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.
index 44b5e83906b039dd2311222a8f39908568c9fd4f..13908679b4ac0685256eda13373dc93d3b855429 100644 (file)
@@ -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
index 7982a52c099c62ef89b9f5d7e22374ed940457f3..524147ea9ca259b9f77de9b444f2a9cf1d7c2c22 100644 (file)
@@ -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.
  */
index e4ed2f1d8d38a6adb6133f47168015287b322df3..327a33f05fbf4e8f383f66d84d3b57681fe2ac65 100644 (file)
@@ -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);
 
index 7731ba9afb95fceae581bcee5a1405387e783280..596664ffdbab4aa4484dd748169e9ec0dfeaccf2 100644 (file)
@@ -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.
 {
index 6b5dabfe6c2e3e4c0ad7bd5b91e2a07588feb6cd..27f230bd133e3cc144d1d81ea18294ae09ae9009 100644 (file)
@@ -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
-
 /*
  *-----------------------------------------------------------------------------
  *
index e818e1c175d58e113720e16a1378afd11f00b0ba..818e61e723c03e37a6bf1ce237de2e23efc4948e 100644 (file)
@@ -644,10 +644,6 @@ ReadInterfaceDetails(const struct intf_entry *entry, // IN
    return 0;
 }
 
-#endif // !NO_DNET
-
-
-#ifdef USE_RESOLVE
 
 /*
  ******************************************************************************
index 3671c9aaab654fdafd98845b3ae7baccdc2456c4..db042da4fea991d21e97c3a60982f9ae50fdb3df 100644 (file)
@@ -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
index 9a86d92f5abd258b6b9cbc8f2d7184b744d10465..023d41f1141aac27ee2aedd4fa2485a721db4975 100644 (file)
@@ -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 (file)
index a543cc1..0000000
+++ /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 <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
index 9eed761e82a8f60c5cb4eac562ff4ecabaef0c48..e0cf2c5ab842f3e2318facfbda082b1b16e952fb 100644 (file)
@@ -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;