From: John Wolfe Date: Fri, 20 Nov 2020 16:37:30 +0000 (-0800) Subject: Replace g_key_file() usage in the Vix plugin with VMTools functions. X-Git-Tag: stable-11.3.0~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf677ea09702cb9185409dbdd6ca94478dcc7227;p=thirdparty%2Fopen-vm-tools.git Replace g_key_file() usage in the Vix plugin with VMTools functions. --- diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 8b4650468..b2ac2f06f 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -2735,14 +2735,14 @@ VixTools_GetToolsPropertiesImpl(GKeyFile *confDictRef, // IN packageList = ""; if (confDictRef != NULL) { - powerOffScript = g_key_file_get_string(confDictRef, "powerops", - CONFNAME_POWEROFFSCRIPT, NULL); - powerOnScript = g_key_file_get_string(confDictRef, "powerops", - CONFNAME_POWERONSCRIPT, NULL); - resumeScript = g_key_file_get_string(confDictRef, "powerops", - CONFNAME_RESUMESCRIPT, NULL); - suspendScript = g_key_file_get_string(confDictRef, "powerops", - CONFNAME_SUSPENDSCRIPT, NULL); + powerOffScript = VMTools_ConfigGetString(confDictRef, "powerops", + CONFNAME_POWEROFFSCRIPT, NULL); + powerOnScript = VMTools_ConfigGetString(confDictRef, "powerops", + CONFNAME_POWERONSCRIPT, NULL); + resumeScript = VMTools_ConfigGetString(confDictRef, "powerops", + CONFNAME_RESUMESCRIPT, NULL); + suspendScript = VMTools_ConfigGetString(confDictRef, "powerops", + CONFNAME_SUSPENDSCRIPT, NULL); } tempDir = File_GetSafeRandomTmpDir(TRUE); @@ -3017,10 +3017,10 @@ VixToolsGetAPIDisabledFromConf(GKeyFile *confDictRef, // IN * per-API configs if its set. */ if (confDictRef != NULL) { - disabled = g_key_file_get_boolean(confDictRef, - VIX_TOOLS_CONFIG_API_GROUPNAME, - VIX_TOOLS_CONFIG_API_ALL_NAME, - NULL); + disabled = VMTools_ConfigGetBoolean(confDictRef, + VIX_TOOLS_CONFIG_API_GROUPNAME, + VIX_TOOLS_CONFIG_API_ALL_NAME, + FALSE); if (disabled) { return TRUE; } @@ -3032,10 +3032,10 @@ VixToolsGetAPIDisabledFromConf(GKeyFile *confDictRef, // IN if (NULL != varName) { Str_Snprintf(disabledName, sizeof(disabledName), "%s.disabled", varName); if (confDictRef != NULL) { - disabled = g_key_file_get_boolean(confDictRef, - VIX_TOOLS_CONFIG_API_GROUPNAME, - disabledName, - NULL); + disabled = VMTools_ConfigGetBoolean(confDictRef, + VIX_TOOLS_CONFIG_API_GROUPNAME, + disabledName, + FALSE); } }