mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 18:50:18 +01:00
settings: print filename of loaded setting plugins
(cherry picked from commit 5ecfbf18c2)
This commit is contained in:
parent
a51d2d6149
commit
6ac7a3c30e
1 changed files with 10 additions and 2 deletions
|
|
@ -94,6 +94,8 @@ EXPORT(nm_settings_connection_replace_settings)
|
|||
EXPORT(nm_settings_connection_replace_and_commit)
|
||||
/* END LINKER CRACKROCK */
|
||||
|
||||
#define PLUGIN_MODULE_PATH "plugin-module-path"
|
||||
|
||||
static void claim_connection (NMSettings *self,
|
||||
NMSettingsConnection *connection);
|
||||
|
||||
|
|
@ -610,6 +612,7 @@ add_plugin (NMSettings *self, NMSystemConfigInterface *plugin)
|
|||
NMSettingsPrivate *priv;
|
||||
char *pname = NULL;
|
||||
char *pinfo = NULL;
|
||||
const char *path;
|
||||
|
||||
g_return_if_fail (NM_IS_SETTINGS (self));
|
||||
g_return_if_fail (NM_IS_SYSTEM_CONFIG_INTERFACE (plugin));
|
||||
|
|
@ -627,7 +630,10 @@ add_plugin (NMSettings *self, NMSystemConfigInterface *plugin)
|
|||
NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo,
|
||||
NULL);
|
||||
|
||||
nm_log_info (LOGD_SETTINGS, "Loaded settings plugin %s: %s", pname, pinfo);
|
||||
path = g_object_get_data (G_OBJECT (plugin), PLUGIN_MODULE_PATH);
|
||||
|
||||
nm_log_info (LOGD_SETTINGS, "Loaded settings plugin %s: %s%s%s%s", pname, pinfo,
|
||||
NM_PRINT_FMT_QUOTED (path, " (", path, ")", ""));
|
||||
g_free (pname);
|
||||
g_free (pinfo);
|
||||
}
|
||||
|
|
@ -733,7 +739,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
|
|||
plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
|
||||
if (!plugin) {
|
||||
LOG (LOGL_WARN, "Could not load plugin '%s' from file '%s': %s",
|
||||
pname, full_name, g_module_error ());
|
||||
pname, path, g_module_error ());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -760,6 +766,8 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
|
|||
|
||||
g_module_make_resident (plugin);
|
||||
g_object_weak_ref (obj, (GWeakNotify) g_module_close, plugin);
|
||||
g_object_set_data_full (obj, PLUGIN_MODULE_PATH, path, g_free);
|
||||
path = NULL;
|
||||
add_plugin (self, NM_SYSTEM_CONFIG_INTERFACE (obj));
|
||||
list = g_slist_append (list, obj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue