aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-03-12 17:38:31 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-03-13 01:35:23 +0000
commit3464c860650c5d8cc8abf11c7d2faa074105b8d6 (patch)
tree7ff8767f2e4b213c604ed396036dc0178fc190c0 /src/vat
parent6e4d4a3684914d071a9b9249217bb6222aeb1d24 (diff)
Rationalize plugin symbol error reporting
Change-Id: I64f2b2007f30fc1c6bd2990ba0d7ccbcd43cdb38 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/plugin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vat/plugin.c b/src/vat/plugin.c
index 20de8c50b6f..b94c4fc30d0 100644
--- a/src/vat/plugin.c
+++ b/src/vat/plugin.c
@@ -40,14 +40,19 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi)
if (handle == 0)
{
clib_warning ("%s", dlerror ());
- return -1;
+ return 0;
}
pi->handle = handle;
register_handle = dlsym (pi->handle, "vat_plugin_register");
if (register_handle == 0)
- return 0;
+ {
+ clib_warning ("%s: symbol vat_plugin_register not found", pi->name);
+ dlclose (handle);
+ return 0;
+ }
+
fp = register_handle;