From: Oliver Kurth Date: Wed, 4 Mar 2020 20:07:13 +0000 (-0800) Subject: Mapping the deployPkg log error level to g_log warning level. X-Git-Tag: stable-11.1.0~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbcd0accb045637c56d9dfe9b7ac114d74ac6d73;p=thirdparty%2Fopen-vm-tools.git Mapping the deployPkg log error level to g_log warning level. g_error() is always fatal, resulting in terminating the application. In this case the guest customization will fail. So mapping the deployPkg log error level to g_log warning level to avoid application termination. --- diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c b/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c index da2a93f8a..fd8ae0ec5 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c +++ b/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2019 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2020 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -135,6 +135,9 @@ DeployPkgLog_Close() * If the log file was opened successfully, write to it. * Otherwise call the glib logger, messages are logged * per tools logging configuration. + * Note: since g_error() is always fatal and terminate the application, + * log_error will be logged as g_warning to avoid terminating the + * application. * * Results: * None. @@ -190,10 +193,8 @@ DeployPkgLog_Log(int level, // IN glogLevel = G_LOG_LEVEL_INFO; break; case log_warning: - glogLevel = G_LOG_LEVEL_WARNING; - break; case log_error: - glogLevel = G_LOG_LEVEL_ERROR; + glogLevel = G_LOG_LEVEL_WARNING; break; default: glogLevel = G_LOG_LEVEL_INFO;