aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-03-28 17:41:29 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 11:36:00 -0800
commit9c18bd888a82f4d9c6d1ffe90b5a308492da2a01 (patch)
treec0f64fa3efa57da7ebd4ba071208627715b6ce77
parentee8a3b8de7e68ed7e3b8088596b98f7510c3d8f0 (diff)
downloadlibibverbs-9c18bd888a82f4d9c6d1ffe90b5a308492da2a01.tar.gz
Print a warning if dlopen() of a driver fails
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog5
-rw-r--r--src/init.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 28f78fc..310c71b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-28 Roland Dreier <rdreier@cisco.com>
+
+ * src/init.c (load_driver): Print warning if dlopen() of a driver
+ plugin fails.
+
2006-03-22 Dotan Barak <dotanb@mellanox.co.il>
* examples/asyncwatch.c: Print asynchronous event name as well as
diff --git a/src/init.c b/src/init.c
index 5fa2eb5..a15d295 100644
--- a/src/init.c
+++ b/src/init.c
@@ -64,8 +64,11 @@ static void load_driver(char *so_path)
struct ibv_driver *driver;
dlhandle = dlopen(so_path, RTLD_NOW);
- if (!dlhandle)
+ if (!dlhandle) {
+ fprintf(stderr, PFX "Warning: couldn't load driver %s: %s\n",
+ so_path, dlerror());
return;
+ }
dlerror();
init_func = dlsym(dlhandle, "openib_driver_init");