This happens mainly if plugin contains unresolved symbol.
Such situation typically leads on crash a bit later so it is better
to exit immediatelly and display meaningful error message.
Change-Id: I4abd9a9089a4863400bf609e8d3fd7cebab92913
Signed-off-by: Damjan Marion <damarion@cisco.com>
handle = dlopen ((char *) pi->filename, RTLD_LAZY);
- /*
- * Note: this can happen if the plugin has an undefined symbol reference,
- * so print a warning. Otherwise, the poor slob won't know what happened.
- * Ask me how I know that...
- */
if (handle == 0)
{
clib_warning ("%s", dlerror ());
- return -1;
+ clib_warning ("Failed to load plugin '%s'", pi->name);
+ os_exit (1);
}
pi->handle = handle;