diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2009-08-10 21:37:33 -0300 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2009-08-10 21:37:33 -0300 |
commit | 30aa37abbfb5e6d795f0ec4bb7c88082caf8e66c (patch) | |
tree | 29c1003fb4ff07cc14bcfabbfa0ef2060993a07c /hardinfo2/util.c | |
parent | 7c43c83ce49dde2da82908f76974a0245e5e50bb (diff) |
Fix benchmark.so module build
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); |