search for: dlopen_config_complete

Displaying 3 results from an estimated 3 matches for "dlopen_config_complete".

2020 Feb 16
0
[nbdkit PATCH v4 2/4] tests: Add coverage of new nbdkit_set_dlopen_prefix
...;string.h> + +#include <nbdkit-plugin.h> + +#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL + +static const char *libdir; + +static int +dlopen_config (const char *key, const char *value) +{ + if (strcmp (key, "libdir") == 0) + libdir = value; + return 0; +} + +static int +dlopen_config_complete (void) +{ + char *msg; + + if (libdir) { + if (nbdkit_set_dlopen_prefix (libdir) == -1) + return -1; + } + + /* The main goal of this plugin is to show that we can hook dlopen. + * Test this by requesting a library that doesn't exist, where the + * difference in the error messag...
2020 Feb 17
5
[nbdkit PATCH v5 0/4] vddk: Drive library loading from libdir parameter.
Differences from v4: Patch 1 is simplified: I realized that since we already use -rdynamic for nbdkit (after all, we WANT our dlopen()d plugins to be able to call our nbdkit_* exports), it is only a matter of adding dlopen to the set of symbols that we export. With that done, there is no separate shared library needed; our dlopen shim is now part of nbdkit proper, and we don't have to tweak
2020 Feb 16
6
[nbdkit PATCH v4 0/4] vddk: Drive library loading from libdir parameter.
I'm a lot happier with this version: no mucking with dlmopen(). It does add a bit more coupling between nbdkit proper and the vddk plugin (namely, nbdkit now exports a new function that the vddk plugin relies on), but patch 2 adds testsuite coverage of the new function so we shouldn't regress. Patch 1 and 2 are new, patch 3 is unchanged from when Rich posted it in v2, and patch 4 is