diff options
| -rw-r--r-- | hardinfo2/Makefile.in | 5 | ||||
| -rw-r--r-- | hardinfo2/util.c | 15 | 
2 files changed, 10 insertions, 10 deletions
| diff --git a/hardinfo2/Makefile.in b/hardinfo2/Makefile.in index 098a941c..74ae0dfb 100644 --- a/hardinfo2/Makefile.in +++ b/hardinfo2/Makefile.in @@ -24,9 +24,8 @@ hardinfo: $(OBJECTS) $(MODULES)  $(BENCHMARK_OBJECTS):  	$(CCSLOW) $(CCFLAGS) $(CFLAGS) -c $*.c -o $@ -benchmark.so:	$(BENCHMARK_OBJECTS) benchmark.c -	$(CCSLOW) $(CCFLAGS) $(CFLAGS) -o $@ -shared $(BENCHMARK_OBJECTS) \ -		$(GTK_FLAGS) $(GTK_LIBS) +benchmark.so:	benchmark.c $(BENCHMARK_OBJECTS) +	$(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS) $(BENCHMARK_OBJECTS)  %.so:	%.c  	$(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS) 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); | 
