mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
Log dlopen() errors more verbosely
This commit is contained in:
parent
7022759b7e
commit
0fb9066aaf
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 8 11:05:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/driver.c: Log dlopen related errors at higher log level
|
||||||
|
so important messages are visible by default
|
||||||
|
|
||||||
Fri May 8 10:56:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
Fri May 8 10:56:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* include/libvirt/virterror.h, src/virterror.c: Add new error
|
* include/libvirt/virterror.h, src/virterror.c: Add new error
|
||||||
|
@ -54,13 +54,13 @@ virDriverLoadModule(const char *name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (access(modfile, R_OK) < 0) {
|
if (access(modfile, R_OK) < 0) {
|
||||||
DEBUG("Moodule %s not accessible", modfile);
|
VIR_WARN("Module %s not accessible", modfile);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
|
handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
DEBUG("failed to load module %s %s", modfile, dlerror());
|
VIR_ERROR("failed to load module %s %s", modfile, dlerror());
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,12 +70,12 @@ virDriverLoadModule(const char *name)
|
|||||||
|
|
||||||
regsym = dlsym(handle, regfunc);
|
regsym = dlsym(handle, regfunc);
|
||||||
if (!regsym) {
|
if (!regsym) {
|
||||||
DEBUG("Missing module registration symbol %s", regfunc);
|
VIR_ERROR("Missing module registration symbol %s", regfunc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*regsym)() < 0) {
|
if ((*regsym)() < 0) {
|
||||||
DEBUG("Failed module registration %s", regfunc);
|
VIR_ERROR("Failed module registration %s", regfunc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user