From: VMware, Inc <> Date: Mon, 15 Oct 2012 04:56:50 +0000 (-0700) Subject: Internal branch sync. Included in this change: X-Git-Tag: 2012.10.14-874563~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52f783284ec6a09e121dd3c747d19ca5da643562;p=thirdparty%2Fopen-vm-tools.git Internal branch sync. Included in this change: . VMCI cleanups . tools daemon(s) will emit a log message with version upon startup . reduce verbosity of get_capab log in vmxnet3 Solaris driver . changes in shared code that don't affect open-vm-tools functionality Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/auth/authPosix.c b/open-vm-tools/lib/auth/authPosix.c index 744b72ced..755dbe11d 100644 --- a/open-vm-tools/lib/auth/authPosix.c +++ b/open-vm-tools/lib/auth/authPosix.c @@ -30,15 +30,20 @@ #include "log.h" #ifdef USE_PAM -# include "file.h" -# include "config.h" -# include "localconfig.h" -#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5) -#include -#else -#include -#endif -# include +# include "file.h" +# include "config.h" +# include "localconfig.h" +# if defined __APPLE__ +# include +# if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5 +# include +# else +# include +# endif +# else +# include +# endif +# include #endif #if defined(HAVE_CONFIG_H) || defined(sun) @@ -158,7 +163,7 @@ AuthLoadPAM(void) if (!symbol) { Log("PAM library does not contain required function: %s\n", dlerror()); - + dlclose(pam_library); return FALSE; } diff --git a/open-vm-tools/lib/include/file_extensions.h b/open-vm-tools/lib/include/file_extensions.h index c6684afb9..bc6014285 100644 --- a/open-vm-tools/lib/include/file_extensions.h +++ b/open-vm-tools/lib/include/file_extensions.h @@ -84,6 +84,7 @@ #define ACRONIS_EXTENSION "tib" #define OPEN_VM_FORMAT_EXTENSION "ovf" #define ARCHIVED_OPEN_VM_FORMAT_EXTENSION "ova" +#define NAMESPACEDB_EXTENSION "db" // "xvm" // VMware console configuration file /* diff --git a/open-vm-tools/lib/include/loglevel_user.h b/open-vm-tools/lib/include/loglevel_user.h index e4c851cc4..27db7860c 100644 --- a/open-vm-tools/lib/include/loglevel_user.h +++ b/open-vm-tools/lib/include/loglevel_user.h @@ -268,6 +268,7 @@ LOGLEVEL_VAR(vflash), \ LOGLEVEL_VAR(vva), /* apps/rde/vva */ \ LOGLEVEL_VAR(ftConfig), /*lib/ftConfig */ \ + LOGLEVEL_VAR(vmname), /* lib/vmname */ \ /* end of list */ LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER); diff --git a/open-vm-tools/lib/include/msgList.h b/open-vm-tools/lib/include/msgList.h index 631da4b7d..2e43fda1a 100644 --- a/open-vm-tools/lib/include/msgList.h +++ b/open-vm-tools/lib/include/msgList.h @@ -61,6 +61,7 @@ MsgList *MsgList_CreateStr(const char *id); void MsgList_Append(MsgList **tail, const char *idFmt, ...) PRINTF_DECL(2, 3); void MsgList_VAppend(MsgList **tail, const char *idFmt, va_list args); void MsgList_AppendStr(MsgList **tail, const char *id); +void MsgList_AppendMsgList(MsgList **tail, MsgList *messages); void MsgList_Log(const MsgList *messages); char *MsgList_ToString(const MsgList *messages); diff --git a/open-vm-tools/lib/include/mutexRankLib.h b/open-vm-tools/lib/include/mutexRankLib.h index 04b455f1d..490b79832 100644 --- a/open-vm-tools/lib/include/mutexRankLib.h +++ b/open-vm-tools/lib/include/mutexRankLib.h @@ -103,6 +103,7 @@ #define RANK_scsiStateLock (RANK_libLockBase + 0x5060) #define RANK_parInitLock (RANK_libLockBase + 0x5070) #define RANK_namespaceLock (RANK_libLockBase + 0x5080) +#define RANK_vvolLibLock (RANK_libLockBase + 0x5090) /* * VMDB range: diff --git a/open-vm-tools/lib/include/strutil.h b/open-vm-tools/lib/include/strutil.h index 7ef7ca22e..3bdb3a1ba 100644 --- a/open-vm-tools/lib/include/strutil.h +++ b/open-vm-tools/lib/include/strutil.h @@ -60,8 +60,8 @@ Bool StrUtil_EndsWith(const char *s, const char *suffix); Bool StrUtil_IsASCII(const char *s); Bool StrUtil_VDynBufPrintf(struct DynBuf *b, const char *fmt, va_list args); -Bool StrUtil_DynBufPrintf(struct DynBuf *b, const char *fmt, ...); -void StrUtil_SafeDynBufPrintf(struct DynBuf *b, const char *fmt, ...); +Bool StrUtil_DynBufPrintf(struct DynBuf *b, const char *fmt, ...) PRINTF_DECL(2, 3); +void StrUtil_SafeDynBufPrintf(struct DynBuf *b, const char *fmt, ...) PRINTF_DECL(2, 3); void StrUtil_SafeStrcat(char **prefix, const char *str); void StrUtil_SafeStrcatFV(char **prefix, const char *fmt, va_list args); diff --git a/open-vm-tools/lib/include/vm_version.h b/open-vm-tools/lib/include/vm_version.h index f5a59f33a..e1bc25ec8 100644 --- a/open-vm-tools/lib/include/vm_version.h +++ b/open-vm-tools/lib/include/vm_version.h @@ -398,6 +398,7 @@ # endif # elif defined(VMX86_VPX) # define PRODUCT_LICENSE_VERSION "5.0" +# define PRODUCT_LICENSE_FILE_VERSION "5.1.0.6" # elif defined(VMX86_WBC) # define PRODUCT_LICENSE_VERSION "1.0" # elif defined(VMX86_SDK) @@ -489,6 +490,7 @@ #define PRODUCT_VERSION_MAC_DESKTOP_3 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 3.x" #define PRODUCT_VERSION_MAC_DESKTOP_40 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 4.0" #define PRODUCT_VERSION_MAC_DESKTOP_50 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 5.0" +#define PRODUCT_VERSION_MAC_DESKTOP_2013 PRODUCT_MAC_DESKTOP_BRIEF_NAME " Boo Berry" /* diff --git a/open-vm-tools/lib/misc/msgList.c b/open-vm-tools/lib/misc/msgList.c index 6df8e40a6..548b35280 100644 --- a/open-vm-tools/lib/misc/msgList.c +++ b/open-vm-tools/lib/misc/msgList.c @@ -263,6 +263,40 @@ MsgList_Append(MsgList **list, // IN reference to existing list } +/* + *----------------------------------------------------------------------------- + * + * MsgList_AppendMsgList -- + * + * Append the 'messages' to an existing MsgList, 'list'. Memory + * owner ship is transfered to 'list'. + * + * Results: + * None. + * + * Side effects: + * Callers are responsible to free the returned MsgList. + * + *----------------------------------------------------------------------------- + */ + +void +MsgList_AppendMsgList(MsgList **list, // IN/OUT + MsgList *messages) // IN +{ + if (list != NULL && messages != NULL) { + MsgList *head = messages; + while (messages->next != NULL) { + messages = messages->next; + } + messages->next = *list; + *list = head; + } else { + MsgList_Free(messages); + } +} + + /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/modules/linux/vmci/common/vmciHashtable.c b/open-vm-tools/modules/linux/vmci/common/vmciHashtable.c index e1b4400fa..b7b577d98 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciHashtable.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciHashtable.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2012 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 @@ -271,7 +271,7 @@ VMCIHashTable_RemoveEntry(VMCIHashTable *table, // IN *------------------------------------------------------------------------------ */ -static INLINE VMCIHashEntry * +static VMCIHashEntry * VMCIHashTableGetEntryLocked(VMCIHashTable *table, // IN VMCIHandle handle) // IN { @@ -391,7 +391,7 @@ VMCIHashTable_HoldEntry(VMCIHashTable *table, // IN *------------------------------------------------------------------------------ */ -static INLINE int +static int VMCIHashTableReleaseEntryLocked(VMCIHashTable *table, // IN VMCIHashEntry *entry) // IN { diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c index 82d66ba8a..9f99aaded 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2012 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 @@ -516,7 +516,6 @@ VMCIQPair_Alloc(VMCIQPair **qpair, // OUT if (!myQPair) { return VMCI_ERROR_NO_MEM; } - memset(myQPair, 0, sizeof *myQPair); myQPair->produceQSize = produceQSize; myQPair->consumeQSize = consumeQSize; @@ -926,7 +925,7 @@ VMCIQPair_ConsumeBufReady(const VMCIQPair *qpair) // IN *----------------------------------------------------------------------------- */ -static INLINE ssize_t +static ssize_t EnqueueLocked(VMCIQueue *produceQ, // IN VMCIQueue *consumeQ, // IN const uint64 produceQSize, // IN @@ -1012,7 +1011,7 @@ EnqueueLocked(VMCIQueue *produceQ, // IN *----------------------------------------------------------------------------- */ -static INLINE ssize_t +static ssize_t DequeueLocked(VMCIQueue *produceQ, // IN VMCIQueue *consumeQ, // IN const uint64 consumeQSize, // IN diff --git a/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c b/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c index 6d7e09021..96315c7f2 100644 --- a/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c +++ b/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c @@ -69,7 +69,6 @@ VSockAddr_Init(struct sockaddr_vm *addr, // OUT uint32 port) // IN { ASSERT(addr); - memset(addr, 0, sizeof *addr); VSockAddr_InitNoFamily(addr, cid, port); addr->svm_family = VMCISockGetAFValueInt(); VSOCK_ADDR_ASSERT(addr); @@ -102,12 +101,11 @@ VSockAddr_InitNoFamily(struct sockaddr_vm *addr, // OUT uint32 port) // IN { ASSERT(addr); - memset(addr, 0, sizeof *addr); + memset(addr, 0, sizeof *addr); #if defined(__APPLE__) addr->svm_len = sizeof *addr; #endif - addr->svm_cid = cid; addr->svm_port = port; VSOCK_ADDR_NOFAMILY_ASSERT(addr); diff --git a/open-vm-tools/modules/shared/vmxnet/eth_public.h b/open-vm-tools/modules/shared/vmxnet/eth_public.h index 56620fb23..db57294c4 100644 --- a/open-vm-tools/modules/shared/vmxnet/eth_public.h +++ b/open-vm-tools/modules/shared/vmxnet/eth_public.h @@ -89,22 +89,24 @@ typedef enum { // DIX type fields we care about typedef enum { - ETH_TYPE_IPV4 = 0x0800, - ETH_TYPE_IPV6 = 0x86DD, - ETH_TYPE_ARP = 0x0806, + ETH_TYPE_IPV4 = 0x0800, + ETH_TYPE_IPV6 = 0x86DD, + ETH_TYPE_ARP = 0x0806, ETH_TYPE_RARP = 0x8035, ETH_TYPE_LLDP = 0x88CC, + ETH_TYPE_CDP = 0x2000, ETH_TYPE_AKIMBI = 0x88DE, ETH_TYPE_VMWARE = 0x8922, ETH_TYPE_802_1PQ = 0x8100, // not really a DIX type, but used as such ETH_TYPE_LLC = 0xFFFF, // 0xFFFF is IANA reserved, used to mark LLC } Eth_DixType; typedef enum { - ETH_TYPE_IPV4_NBO = 0x0008, - ETH_TYPE_IPV6_NBO = 0xDD86, - ETH_TYPE_ARP_NBO = 0x0608, + ETH_TYPE_IPV4_NBO = 0x0008, + ETH_TYPE_IPV6_NBO = 0xDD86, + ETH_TYPE_ARP_NBO = 0x0608, ETH_TYPE_RARP_NBO = 0x3580, ETH_TYPE_LLDP_NBO = 0xCC88, + ETH_TYPE_CDP_NBO = 0x0020, ETH_TYPE_AKIMBI_NBO = 0xDE88, ETH_TYPE_VMWARE_NBO = 0x2289, ETH_TYPE_802_1PQ_NBO = 0x0081, // not really a DIX type, but used as such diff --git a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_main.c b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_main.c index 0a95ce0b3..8b9a07f2c 100644 --- a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_main.c +++ b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_main.c @@ -1154,7 +1154,7 @@ vmxnet3_getcapab(void *data, mac_capab_t capab, void *arg) ret = B_FALSE; } - VMXNET3_DEBUG(dp, 2, "getcapab(0x%x) -> %s\n", capab, ret ? "yes" : "no"); + VMXNET3_DEBUG(dp, 3, "getcapab(0x%x) -> %s\n", capab, ret ? "yes" : "no"); return ret; } diff --git a/open-vm-tools/services/vmtoolsd/mainLoop.c b/open-vm-tools/services/vmtoolsd/mainLoop.c index a5738c767..67a23d6af 100644 --- a/open-vm-tools/services/vmtoolsd/mainLoop.c +++ b/open-vm-tools/services/vmtoolsd/mainLoop.c @@ -36,6 +36,7 @@ #include "system.h" #include "util.h" #include "vmcheck.h" +#include "vm_tools_version.h" #include "vmware/guestrpc/tclodefs.h" #include "vmware/tools/log.h" #include "vmware/tools/utils.h" @@ -382,6 +383,11 @@ ToolsCore_Setup(ToolsServiceState *state) ToolsCore_ReloadConfig(state, FALSE); + /* + * Useful for debugging purposes. Log the vesion and build information. + */ + g_message("Tools Version: %s (%s)\n", TOOLS_VERSION_EXT_CURRENT_STR, BUILD_NUMBER); + /* Initializes the app context. */ gctx = g_main_context_default(); state->ctx.version = TOOLS_CORE_API_V1;