Skip to content

Commit

Permalink
even out remaining differences from stable-10.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverkurth committed Jan 8, 2018
1 parent dd736d2 commit 8c0cc53
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 228 deletions.
2 changes: 1 addition & 1 deletion open-vm-tools/README
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions open-vm-tools/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
58 changes: 0 additions & 58 deletions open-vm-tools/lib/asyncsocket/asyncsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
14 changes: 0 additions & 14 deletions open-vm-tools/lib/include/asyncsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 0 additions & 3 deletions open-vm-tools/lib/include/productState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions open-vm-tools/lib/include/x86cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
{
Expand Down
25 changes: 0 additions & 25 deletions open-vm-tools/lib/misc/strutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
*-----------------------------------------------------------------------------
*
Expand Down
4 changes: 0 additions & 4 deletions open-vm-tools/lib/nicInfo/nicInfoPosix.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,6 @@ ReadInterfaceDetails(const struct intf_entry *entry, // IN
return 0;
}

#endif // !NO_DNET


#ifdef USE_RESOLVE

/*
******************************************************************************
Expand Down
5 changes: 0 additions & 5 deletions open-vm-tools/lib/syncDriver/syncDriverLinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 0 additions & 34 deletions open-vm-tools/libDeployPkg/linuxDeployment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
*----------------------------------------------------------------------------
*
Expand Down Expand Up @@ -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
Expand Down
53 changes: 0 additions & 53 deletions open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c

This file was deleted.

30 changes: 4 additions & 26 deletions open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8c0cc53

Please sign in to comment.