compositor: report .so path when load_module() fails
authorPekka Paalanen <ppaalanen@gmail.com>
Thu, 26 Apr 2012 07:31:36 +0000 (10:31 +0300)
committerPekka Paalanen <ppaalanen@gmail.com>
Thu, 26 Apr 2012 12:44:13 +0000 (15:44 +0300)
I want to know which module is failing to load with unresolved symbols.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
src/compositor.c

index 768477d..6ce10a4 100644 (file)
@@ -2608,14 +2608,15 @@ load_module(const char *name, const char *entrypoint, void **handle)
        module = dlopen(path, RTLD_LAZY);
        if (!module) {
                fprintf(stderr,
-                       "failed to load module: %s\n", dlerror());
+                       "failed to load module '%s': %s\n", path, dlerror());
                return NULL;
        }
 
        init = dlsym(module, entrypoint);
        if (!init) {
                fprintf(stderr,
-                       "failed to lookup init function: %s\n", dlerror());
+                       "failed to lookup init function in '%s': %s\n",
+                       path, dlerror());
                return NULL;
        }