From: Kruti Pendharkar Date: Tue, 24 Jun 2025 16:26:23 +0000 (-0700) Subject: Change to common header file not applicable to open-vm-tools. X-Git-Tag: stable-13.1.0~149 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=943d0d03ac76750ffca3448feb9da075a126698d;p=thirdparty%2Fopen-vm-tools.git Change to common header file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/log.h b/open-vm-tools/lib/include/log.h index beca758fb..13ea91357 100644 --- a/open-vm-tools/lib/include/log.h +++ b/open-vm-tools/lib/include/log.h @@ -477,9 +477,12 @@ Log_SetVmxStatsData(LogOutput *output, * the product should have the dependency, not an underlying library. * * In complex cases, where an "InitWith" is not sufficient and Log_AddOutput - * must be used directly, the client should call Log_SetProductInfo, passing - * the appropriate parameters, so the log file header information will be - * correct. + * must be used directly, the client must call Log_SetProductInfo2, passing + * the appropriate parameters, so the logging information will be correct + * (e.g. log file header, syslog transmissions). + * + * The original Log_SetProductInfo continues to exist for compatiblity with + * ancient iofilters. It should not be used. */ void @@ -488,13 +491,33 @@ Log_SetProductInfo(const char *appName, const char *buildNumber, const char *compilationOption); +void +Log_SetProductInfo2(const char *appName, + const char *appVersion, + const char *buildNumber, + const char *compilationOption, + const char *sdCompId); + +#if defined(VMX86_SERVER) +#define VMW_LOG_DEFAULT_SD_COMP_ID "esx" +#elif defined (__APPLE__) +#define VMW_LOG_DEFAULT_SD_COMP_ID "fusion" +#else +#define VMW_LOG_DEFAULT_SD_COMP_ID "ws" +#endif + +#if !defined(VMW_LOG_SET_SD_COMP_ID) +#define VMW_LOG_SET_SD_COMP_ID VMW_LOG_DEFAULT_SD_COMP_ID +#endif + static INLINE void Log_SetProductInfoSimple(void) { - Log_SetProductInfo(ProductState_GetName(), - ProductState_GetVersion(), - ProductState_GetBuildNumberString(), - ProductState_GetCompilationOption()); + Log_SetProductInfo2(ProductState_GetName(), + ProductState_GetVersion(), + ProductState_GetBuildNumberString(), + ProductState_GetCompilationOption(), + VMW_LOG_SET_SD_COMP_ID); } LogOutput *