From: VMware, Inc <> Date: Mon, 22 Mar 2010 22:08:32 +0000 (-0700) Subject: Get rid of functions that don't have any callers. X-Git-Tag: 2010.03.20-243334~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e23e01d95d3980d6bceaf04ccde7372d8128d77e;p=thirdparty%2Fopen-vm-tools.git Get rid of functions that don't have any callers. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/debug.h b/open-vm-tools/lib/include/debug.h index 1033e74a6..5485587a1 100644 --- a/open-vm-tools/lib/include/debug.h +++ b/open-vm-tools/lib/include/debug.h @@ -31,9 +31,6 @@ void Debug(char const *fmt, ...) PRINTF_DECL(1, 2); void Debug_Set(Bool enable, const char *prefix); -Bool Debug_IsEnabled(void); void Debug_EnableToFile(const char *file, Bool backup); -Bool Debug_EnableIfFile(const char *enableFile, const char *toFileFile); - #endif /* __DEBUG_H__ */ diff --git a/open-vm-tools/lib/include/netutil.h b/open-vm-tools/lib/include/netutil.h index 7325af40e..c85c4c356 100644 --- a/open-vm-tools/lib/include/netutil.h +++ b/open-vm-tools/lib/include/netutil.h @@ -73,7 +73,6 @@ typedef FIXED_INFO_W2KSP1 *PFIXED_INFO; DWORD NetUtil_LoadIpHlpApiDll(void); DWORD NetUtil_FreeIpHlpApiDll(void); -Bool NetUtil_ReleaseRenewIP(Bool release); /* Wrappers for functions in iphlpapi.dll */ PFIXED_INFO NetUtil_GetNetworkParams(void); diff --git a/open-vm-tools/lib/include/system.h b/open-vm-tools/lib/include/system.h index 449ee4465..9d70061d1 100644 --- a/open-vm-tools/lib/include/system.h +++ b/open-vm-tools/lib/include/system.h @@ -36,7 +36,6 @@ uint64 System_Uptime(void); Unicode System_GetTimeAsString(void); -Bool System_IsACPI(void); void System_Shutdown(Bool reboot); Bool System_IsUserAdmin(void); @@ -92,11 +91,8 @@ Bool System_SetAeroState(AeroStateCommand command, AeroStateCommand *oldState); * preprocessor option. */ #if !defined(_WIN32) -Bool System_WritePidFile(const char *fileName, pid_t pid); const char **System_GetNativeEnviron(const char **compatEnviron); void System_FreeNativeEnviron(const char **nativeEnviron); -int System_UnsetEnv(const char *variableName); -char *System_SetLDPath(const char *path, const Bool native); #endif #endif /* __SYSTEM_H__ */ diff --git a/open-vm-tools/lib/system/systemLinux.c b/open-vm-tools/lib/system/systemLinux.c index 86b13150e..62875dfcb 100644 --- a/open-vm-tools/lib/system/systemLinux.c +++ b/open-vm-tools/lib/system/systemLinux.c @@ -239,32 +239,6 @@ System_GetTimeAsString(void) } -/* - *---------------------------------------------------------------------- - * - * System_IsACPI -- - * - * Is this an ACPI system? - * - * Results: - * TRUE if this is an ACPI system. - * FALSE if this is not an ACPI system. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Bool -System_IsACPI(void) -{ - ASSERT(FALSE); - - return FALSE; -} - - /* *----------------------------------------------------------------------------- * @@ -401,113 +375,6 @@ System_SetEnv(Bool global, // IN } // System_SetEnv -/* - *---------------------------------------------------------------------- - * - * System_UnsetEnv -- - * - * Unset environment variable. - * - * Results: - * 0 if success, -1 otherwise. - * - * Side effects: - * Unsets the environment variable. - * - *---------------------------------------------------------------------- - */ - -int -System_UnsetEnv(const char *valueName) // IN: UTF-8 -{ -#if defined(sun) - return(-1); -#else - Posix_Unsetenv(valueName); - return 0; -#endif -} // System_UnsetEnv - - -/* - *---------------------------------------------------------------------- - * - * System_SetLDPath -- - * - * Set LD_LIBRARY_PATH. If native is TRUE, use VMWARE_LD_LIBRARY_PATH - * as the value (and ignore the path argument, which should be set to - * NULL in this case). If native is FALSE, use the passed in path (and - * if that path is NULL, unsetenv the value). - * - * Results: - * The previous value of the environment variable. The caller is - * responsible for calling free() on this pointer. - * - * Side effects: - * Manipulates the value of LD_LIBRARY_PATH variable. - * - *---------------------------------------------------------------------- - */ - -char * -System_SetLDPath(const char *path, // IN: UTF-8 - const Bool native) // IN: If TRUE, ignore path and use VMware value -{ - char *vmldpath = NULL; - char *tmppath = NULL; - char *oldpath; - - ASSERT(!native || path == NULL); - - /* - * Get the original LD_LIBRARY_PATH, so the installed applications - * don't try to use our versions of the libraries. - * - * From bora/apps/lib/lui/browser.cc::ResetEnvVars(): - * - * For each variable we care about, there are three possible states: - * 1) The variable was not considered for saving. - * This is indicated by VMWARE_'s first character not being - * set to either "1" or "0". - * We should not manipulate . - * 2) The variable was considered but was not set. - * VMWARE_ is set to "0". - * We should unset . - * 3) The variable was considered and was set. - * VMWARE_ is set to "1" + "". - * We should set back to the saved value. - * - * XXX: There are other variables that may need resetting (for a list, check - * bora/apps/lib/lui/browser.cc or the wrapper scripts), but that would - * require some more refactoring of this code (not using system(3), for - * example). - */ - oldpath = System_GetEnv(TRUE, "LD_LIBRARY_PATH"); - if (native == TRUE) { - char *p = NULL; - vmldpath = tmppath = System_GetEnv(TRUE, "VMWARE_LD_LIBRARY_PATH"); - if (vmldpath && strlen(vmldpath) && vmldpath[0] == '1') { - vmldpath++; - } else { - vmldpath = p = Util_SafeStrdup(""); - } - if (System_SetEnv(TRUE, "LD_LIBRARY_PATH", vmldpath) == -1) { - Debug("%s: failed to set LD_LIBRARY_PATH\n", __FUNCTION__); - } - free(tmppath); - free(p); - } else if (path) { - /* - * Set LD_LIBRARY_PATH to the specified value. - */ - System_SetEnv(TRUE, "LD_LIBRARY_PATH", (char *) path); - } else { - System_UnsetEnv("LD_LIBRARY_PATH"); - } - return oldpath; -} // System_SetLDPath - - /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/toolbox/debugStdio.c b/open-vm-tools/toolbox/debugStdio.c index 22a6cb801..c8ead38bf 100644 --- a/open-vm-tools/toolbox/debugStdio.c +++ b/open-vm-tools/toolbox/debugStdio.c @@ -116,29 +116,6 @@ Debug_EnableToFile(const char *file, // IN } -/* - *----------------------------------------------------------------------------- - * - * Debug_IsEnabled -- - * - * Is debugging output enabled? - * - * Result - * TRUE/FALSE - * - * Side-effects - * None. - * - *----------------------------------------------------------------------------- - */ - -Bool -Debug_IsEnabled(void) -{ - return debugEnabled; -} - - /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/vmware-user/debugStdio.c b/open-vm-tools/vmware-user/debugStdio.c index 22a6cb801..c8ead38bf 100644 --- a/open-vm-tools/vmware-user/debugStdio.c +++ b/open-vm-tools/vmware-user/debugStdio.c @@ -116,29 +116,6 @@ Debug_EnableToFile(const char *file, // IN } -/* - *----------------------------------------------------------------------------- - * - * Debug_IsEnabled -- - * - * Is debugging output enabled? - * - * Result - * TRUE/FALSE - * - * Side-effects - * None. - * - *----------------------------------------------------------------------------- - */ - -Bool -Debug_IsEnabled(void) -{ - return debugEnabled; -} - - /* *----------------------------------------------------------------------------- *