From: VMware, Inc <> Date: Mon, 26 Jul 2010 18:35:47 +0000 (-0700) Subject: Minor cleanups. X-Git-Tag: 2010.07.25-280253~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6601aa522ba9d6494830d183f53397265e67dd59;p=thirdparty%2Fopen-vm-tools.git Minor cleanups. . remove function typedefs from message.h (they're not used anywhere). . remove function declarations from vixTools.h (functions don't exist). . remove socketMgr.h (not included by anyone anymore). . remove stale GuestInfo_GetSystemBitness prototype. . remove RpcIn_restart() (not used anywhere). Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/guestInfoLib.h b/open-vm-tools/lib/include/guestInfoLib.h index 5c25c77bd..19c0d21fb 100644 --- a/open-vm-tools/lib/include/guestInfoLib.h +++ b/open-vm-tools/lib/include/guestInfoLib.h @@ -60,10 +60,6 @@ GuestInfo_GetOSName(unsigned int outBufFullLen, char *osNameFull, char *osName); -int -GuestInfo_GetSystemBitness(void); - - /* * Comparison routines -- handy for caching, unit testing. */ diff --git a/open-vm-tools/lib/include/message.h b/open-vm-tools/lib/include/message.h index 757e9f4c0..e183d7ed3 100644 --- a/open-vm-tools/lib/include/message.h +++ b/open-vm-tools/lib/include/message.h @@ -49,29 +49,6 @@ extern "C" { typedef struct Message_Channel Message_Channel; - -/* - * These functions must be implemented by any external Message - * transport implementation. Some examples include crossTalk, - * a network socket, or a Microsoft Hypervisor backdoor. - * - * These external functions mirror the same corresponding Message_* - * functions below. - */ -typedef Message_Channel *(*MessageOpenProcType)(uint32 proto); - -typedef Bool (*MessageGetReadEventProcType)(Message_Channel *chan, - int64 *readEvent); - -typedef Bool (*MessageSendProcType)(Message_Channel *chan, - const unsigned char *buf, - size_t bufSize); -typedef Bool (*MessageReceiveProcType)(Message_Channel *chan, - unsigned char **buf, - size_t *bufSize); -typedef Bool (*MessageCloseProcType)(Message_Channel *chan); - - Message_Channel * Message_Open(uint32 proto); // IN diff --git a/open-vm-tools/lib/include/rpcin.h b/open-vm-tools/lib/include/rpcin.h index 62a64d329..9579eadd4 100644 --- a/open-vm-tools/lib/include/rpcin.h +++ b/open-vm-tools/lib/include/rpcin.h @@ -117,7 +117,6 @@ unsigned int RpcIn_SetRetVals(char const **result, size_t *resultLen, #endif void RpcIn_Destruct(RpcIn *in); -Bool RpcIn_restart(RpcIn *in); Bool RpcIn_stop(RpcIn *in); diff --git a/open-vm-tools/lib/include/vixTools.h b/open-vm-tools/lib/include/vixTools.h index 8a4a73a0e..9f8842fa3 100644 --- a/open-vm-tools/lib/include/vixTools.h +++ b/open-vm-tools/lib/include/vixTools.h @@ -107,26 +107,6 @@ VixError VixToolsGetUserTmpDir(void *userToken, Bool VixToolsUserIsMemberOfAdministratorGroup(VixCommandRequestHeader *requestMsg); #endif // _WIN32 -#if IMPLEMENT_SOCKET_MGR -VixError VixToolsSocketConnect(VixCommandRequestHeader *requestMsg, - char **result); - -VixError VixToolsSocketListen(VixCommandRequestHeader *requestMsg, - char **result); - -VixError VixToolsSocketAccept(VixCommandRequestHeader *requestMsg, - char *testName); - -VixError VixToolsSocketSend(VixCommandRequestHeader *requestMsg, - char *testName); - -VixError VixToolsSocketRecv(VixCommandRequestHeader *requestMsg, - char *testName); - -VixError VixToolsSocketClose(VixCommandRequestHeader *requestMsg); -#endif // IMPLEMENT_SOCKET_MGR - - #endif /* __VIX_TOOLS_H__ */ diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c index 3984203f1..eec994244 100644 --- a/open-vm-tools/lib/rpcIn/rpcin.c +++ b/open-vm-tools/lib/rpcIn/rpcin.c @@ -854,64 +854,6 @@ error: } -/* - *----------------------------------------------------------------------------- - * - * RpcIn_restart -- - * - * Stops/starts the background loop that receives RPC from VMware. - * Keeps already registered callbacks. Regardless of the value returned, - * callers are still expected to call RpcIn_stop() when done using rpcin, - * to properly release used resources. - * - * Result - * TRUE on success - * FALSE on failure - * - * Side-effects - * None - * - *----------------------------------------------------------------------------- - */ - -Bool -RpcIn_restart(RpcIn *in) // IN -{ - ASSERT(in); - - if (RpcIn_stop(in) == FALSE) { - return FALSE; - } - - ASSERT(in->channel == NULL); - in->channel = Message_Open(0x4f4c4354); - if (in->channel == NULL) { - Debug("RpcIn_restart: couldn't open channel with TCLO protocol\n"); - return FALSE; - } - - if (in->last_result) { - free(in->last_result); - in->last_result = NULL; - } - in->last_resultLen = 0; - in->mustSend = TRUE; - - ASSERT(in->nextEvent == NULL); -#if defined(VMTOOLS_USE_GLIB) - RPCIN_SCHED_EVENT(in, g_idle_source_new()); -#else - in->nextEvent = EventManager_Add(gTimerEventQueue, 0, RpcInLoop, in); -#endif - if (in->nextEvent == NULL) { - Debug("RpcIn_restart: couldn't start the loop\n"); - return FALSE; - } - - return TRUE; -} - - #if !defined(VMTOOLS_USE_GLIB) /* *-----------------------------------------------------------------------------