modules, particles: type-specific filename prefix

Instead of naming the shared libraries libfoo.so, add a type-specific
prefix: module_foo.so, or particle_foo.so
This commit is contained in:
Daniel Eklöf 2019-01-13 11:26:31 +01:00
parent ec4a47e5db
commit 45280416ff
3 changed files with 7 additions and 1 deletions

View file

@ -53,7 +53,9 @@ plugin_load(const char *name, enum plugin_type type)
}
char path[128];
snprintf(path, sizeof(path), "lib%s.so", name);
snprintf(
path, sizeof(path), "%s_%s.so",
type == PLUGIN_MODULE ? "module" : "particle", name);
/* Not loaded - do it now */
void *lib = dlopen(path, RTLD_LOCAL | RTLD_NOW);