diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2009-07-14 15:16:53 -0600 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-07-16 14:53:06 -0700 |
commit | 8af67ff9d4faa0d624f058148aee4e3fb0f12aab (patch) | |
tree | 03bafb59b7253570ddeb607ef0e204b61eb95f1b | |
parent | b9fb2f621198ab9d481fa8df009efc42398078bb (diff) | |
download | libibverbs-8af67ff9d4faa0d624f058148aee4e3fb0f12aab.tar.gz |
Allow config file paths to the driver library to be absolute
If the driver line starts with a / then no lib prefix is applied and
the full path is passed to dlopen(). This allows a completely
self-contained installation that relies on RPATH for the binaries and
this mechanism for the drivers.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | src/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -184,6 +184,8 @@ static void load_driver(const char *name) #define IBV_QUOTE(x) __IBV_QUOTE(x) if (asprintf(&so_name, + name[0] == '/' ? + "%s-" IBV_QUOTE(IBV_DEVICE_LIBRARY_EXTENSION) ".so" : "lib%s-" IBV_QUOTE(IBV_DEVICE_LIBRARY_EXTENSION) ".so", name) < 0) { fprintf(stderr, PFX "Warning: couldn't load driver '%s'.\n", |