diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-03-28 17:41:29 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 11:36:00 -0800 |
commit | 9c18bd888a82f4d9c6d1ffe90b5a308492da2a01 (patch) | |
tree | c0f64fa3efa57da7ebd4ba071208627715b6ce77 | |
parent | ee8a3b8de7e68ed7e3b8088596b98f7510c3d8f0 (diff) | |
download | libibverbs-9c18bd888a82f4d9c6d1ffe90b5a308492da2a01.tar.gz |
Print a warning if dlopen() of a driver fails
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/init.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -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 @@ -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"); |