diff options
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r-- | hardinfo2/util.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c index f35f0ac1..6897fbcb 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -667,6 +667,7 @@ static ShellModule *module_load(gchar * filename) tmp = g_build_filename(params.path_lib, "modules", filename, NULL); module->dll = g_module_open(tmp, G_MODULE_BIND_LAZY); + DEBUG("gmodule resource for ``%s'' is %p", tmp, module->dll); g_free(tmp); if (module->dll) { @@ -677,16 +678,14 @@ static ShellModule *module_load(gchar * filename) ModuleEntry *entries; gint i = 0; - if (!g_module_symbol - (module->dll, "hi_module_get_entries", - (gpointer) & get_module_entries) - || !g_module_symbol(module->dll, "hi_module_get_name", - (gpointer) & name_func)) { + if (!g_module_symbol(module->dll, "hi_module_get_entries", (gpointer) & get_module_entries) || + !g_module_symbol(module->dll, "hi_module_get_name", (gpointer) & name_func)) { + DEBUG("cannot find needed symbols; is ``%s'' a real module?", filename); goto failed; } - if (g_module_symbol - (module->dll, "hi_module_init", (gpointer) & init)) { + if (g_module_symbol(module->dll, "hi_module_init", (gpointer) & init)) { + DEBUG("initializing module ``%s''", filename); init(); } @@ -725,8 +724,10 @@ static ShellModule *module_load(gchar * filename) i++; } + DEBUG("registering methods for module ``%s''", filename); module_register_methods(module); } else { + DEBUG("cannot g_module_open(``%s''). permission problem?", filename); failed: DEBUG("loading module %s failed", filename); |