compositor: report .so path when load_module() fails
I want to know which module is failing to load with unresolved symbols. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
+3
-2
@@ -2608,14 +2608,15 @@ load_module(const char *name, const char *entrypoint, void **handle)
|
|||||||
module = dlopen(path, RTLD_LAZY);
|
module = dlopen(path, RTLD_LAZY);
|
||||||
if (!module) {
|
if (!module) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"failed to load module: %s\n", dlerror());
|
"failed to load module '%s': %s\n", path, dlerror());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
init = dlsym(module, entrypoint);
|
init = dlsym(module, entrypoint);
|
||||||
if (!init) {
|
if (!init) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"failed to lookup init function: %s\n", dlerror());
|
"failed to lookup init function in '%s': %s\n",
|
||||||
|
path, dlerror());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user