diff options
author | Richard Levitte <levitte@openssl.org> | 2001-11-15 18:24:42 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-11-15 18:24:42 +0000 |
commit | acf60ef707e16f786ea34abc0d7c460eb47107d6 (patch) | |
tree | 9278037d84b5de5591b4d9257128d175f38770be | |
parent | c85a15785475695a98b45de731e5398d46191c40 (diff) |
At least for the two common Unixly DSO loading methods, include the
system error in the error text.
-rw-r--r-- | crypto/dso/dso_dl.c | 9 | ||||
-rw-r--r-- | crypto/dso/dso_dlfcn.c | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 6e93268cc2..195717e993 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -130,7 +130,8 @@ static int dl_load(DSO *dso) if(ptr == NULL) { DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED); - ERR_add_error_data(3, "filename(", filename, ")"); + ERR_add_error_data(4, "filename(", filename, "): ", + strerror(errno)); goto err; } if(!sk_push(dso->meth_data, (char *)ptr)) @@ -199,7 +200,8 @@ static void *dl_bind_var(DSO *dso, const char *symname) if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) { DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); - ERR_add_error_data(3, "symname(", symname, ")"); + ERR_add_error_data(4, "symname(", symname, "): ", + strerror(errno)); return(NULL); } return(sym); @@ -229,7 +231,8 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) { DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); - ERR_add_error_data(3, "symname(", symname, ")"); + ERR_add_error_data(4, "symname(", symname, "): ", + strerror(errno)); return(NULL); } return((DSO_FUNC_TYPE)sym); diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 681e9782ad..1a19164d3b 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -147,7 +147,7 @@ static int dlfcn_load(DSO *dso) if(ptr == NULL) { DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED); - ERR_add_error_data(3, "filename(", filename, ")"); + ERR_add_error_data(4, "filename(", filename, "): ", dlerror()); goto err; } if(!sk_push(dso->meth_data, (char *)ptr)) @@ -215,7 +215,7 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname) if(sym == NULL) { DSOerr(DSO_F_DLFCN_BIND_VAR,DSO_R_SYM_FAILURE); - ERR_add_error_data(3, "symname(", symname, ")"); + ERR_add_error_data(4, "symname(", symname, "): ", dlerror()); return(NULL); } return(sym); @@ -246,7 +246,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) if(sym == NULL) { DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE); - ERR_add_error_data(3, "symname(", symname, ")"); + ERR_add_error_data(4, "symname(", symname, "): ", dlerror()); return(NULL); } return(sym); |