diff options
| author | G. Paul Ziemba <p-fbsd-bugs@ziemba.us> | 2021-09-03 09:49:05 -0700 |
|---|---|---|
| committer | G. Paul Ziemba <p-fbsd-bugs@ziemba.us> | 2021-09-14 09:51:49 -0700 |
| commit | 52fad8f6563080c64b5609f8b357ed47b1dfb78c (patch) | |
| tree | 71f29fe8be8f7f7d68982c8e15abfdfbd08e3a18 /ldpd/ldpd.c | |
| parent | 53b08a373db2aadff166bba08c40cdd72101768a (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 'ldpd/ldpd.c')
| -rw-r--r-- | ldpd/ldpd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 000d1a3301..e24eba7cd4 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -94,10 +94,9 @@ static void ldp_load_module(const char *name) { const char *dir; dir = ldpd_di.module_path ? ldpd_di.module_path : frr_moduledir; - char moderr[256]; struct frrmod_runtime *module; - module = frrmod_load(name, dir, moderr, sizeof(moderr)); + module = frrmod_load(name, dir, NULL,NULL); if (!module) { fprintf(stderr, "%s: failed to load %s", __func__, name); log_warnx("%s: failed to load %s", __func__, name); |
