log dlerror message when dlopen failed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2596 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
5123be2b85
commit
55418c5ac3
|
@ -352,7 +352,7 @@ static void *load_dynamic_driver(sc_context_t *ctx, void **dll,
|
|||
return NULL;
|
||||
handle = lt_dlopen(libname);
|
||||
if (handle == NULL) {
|
||||
sc_error(ctx, "Module %s: cannot load %s library\n",name,libname);
|
||||
sc_error(ctx, "Module %s: cannot load %s library: %s\n", name, libname, lt_dlerror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,8 +214,8 @@ static int parse_emu_block(sc_pkcs15_card_t *p15card, scconf_block *conf)
|
|||
/* try to open dynamic library */
|
||||
handle = lt_dlopen(module_name);
|
||||
if (!handle) {
|
||||
sc_debug(ctx, "unable to open dynamic library '%s'\n",
|
||||
module_name);
|
||||
sc_debug(ctx, "unable to open dynamic library '%s': %s\n",
|
||||
module_name, lt_dlerror());
|
||||
return SC_ERROR_INTERNAL;
|
||||
}
|
||||
/* try to get version of the driver/api */
|
||||
|
|
|
@ -449,7 +449,7 @@ static int ctapi_load_module(sc_context_t *ctx,
|
|||
val = conf->name->data;
|
||||
dlh = lt_dlopen(val);
|
||||
if (!dlh) {
|
||||
sc_error(ctx, "Unable to open shared library '%s'\n", val);
|
||||
sc_error(ctx, "Unable to open shared library '%s': %s\n", val, lt_dlerror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,8 +183,8 @@ sc_ui_get_func(sc_context_t *ctx, const char *name, void **ret)
|
|||
sc_ui_lib_handle = lt_dlopen(lib_name);
|
||||
if (!sc_ui_lib_handle) {
|
||||
sc_error(ctx,
|
||||
"Unable to open user interface library %s\n",
|
||||
lib_name);
|
||||
"Unable to open user interface library '%s': %s\n",
|
||||
lib_name, lt_dlerror());
|
||||
return SC_ERROR_INTERNAL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ static void *load_dynamic_driver(sc_context_t *ctx, void **dll,
|
|||
return NULL;
|
||||
handle = lt_dlopen(libname);
|
||||
if (handle == NULL) {
|
||||
sc_error(ctx, "Module %s: cannot load %s library\n",name,libname);
|
||||
sc_error(ctx, "Module %s: cannot load '%s' library: %s\n", name, libname, lt_dlerror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue