diff options
author | Alfred E. Heggestad <aeh@db.org> | 2015-06-27 10:04:47 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2015-06-27 10:04:47 +0200 |
commit | f8873153be5480ca6b79741e7cbdf667080e562d (patch) | |
tree | 1dd9688f8bc8dfbdd203bbfa631d234fa1ee2054 /src/module.c | |
parent | 8f5b65ec11c21035eca2cf87d40cc2f1578e5627 (diff) |
added -m option to pre-load modules before config is parsed
Diffstat (limited to 'src/module.c')
-rw-r--r-- | src/module.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 12b3d13..d9c7584 100644 --- a/src/module.c +++ b/src/module.c @@ -154,3 +154,17 @@ void module_app_unload(void) { list_flush(&modappl); } + + +int module_preload(const char *module) +{ + struct pl path, name; + + if (!module) + return EINVAL; + + pl_set_str(&path, "."); + pl_set_str(&name, module); + + return load_module(NULL, &path, &name); +} |