summaryrefslogtreecommitdiff
path: root/lib/module.h
diff options
context:
space:
mode:
authorG. Paul Ziemba <p-fbsd-bugs@ziemba.us>2021-09-03 09:49:05 -0700
committerG. Paul Ziemba <p-fbsd-bugs@ziemba.us>2021-09-14 09:51:49 -0700
commit52fad8f6563080c64b5609f8b357ed47b1dfb78c (patch)
tree71f29fe8be8f7f7d68982c8e15abfdfbd08e3a18 /lib/module.h
parent53b08a373db2aadff166bba08c40cdd72101768a (diff)
lib/module.c and callers of frrmod_load(): fix error messages
frrmod_load() attempts to dlopen() several possible paths (constructed from its basename argument) until one succeeds. Each dlopen() attempt may fail for a different reason, and the important one might not be the last one. Example: dlopen(a/foo): file not found dlopen(b/foo): symbol "bar" missing dlopen(c/foo): file not found Previous code reported only the most recent error. Now frrmod_load() describes each dlopen() failure. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'lib/module.h')
-rw-r--r--lib/module.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/module.h b/lib/module.h
index 6275877cb3..ae1ca2f757 100644
--- a/lib/module.h
+++ b/lib/module.h
@@ -91,7 +91,9 @@ extern struct frrmod_runtime *frrmod_list;
extern void frrmod_init(struct frrmod_runtime *modinfo);
extern struct frrmod_runtime *frrmod_load(const char *spec, const char *dir,
- char *err, size_t err_len);
+ void (*pFerrlog)(const void *,
+ const char *),
+ const void *pErrlogCookie);
#if 0
/* not implemented yet */
extern void frrmod_unload(struct frrmod_runtime *module);