From 71f5e7e76df15b30745933403487e6a78ac9c5a1 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Mon, 4 Sep 2023 14:34:38 -0600 Subject: [PATCH] Print _WHICH_ initialiser failed --- src/lib/server/dl_module.c | 2 +- src/lib/util/dl.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/server/dl_module.c b/src/lib/server/dl_module.c index f839df373d30..6bde7c3e9495 100644 --- a/src/lib/server/dl_module.c +++ b/src/lib/server/dl_module.c @@ -453,7 +453,7 @@ dl_module_t const *dl_module(dl_module_t const *parent, char const *name, dl_mod DEBUG3("%s validated. Handle address %p, symbol address %p", module_name, dl, common); if (dl_symbol_init(dl_module_loader->dl_loader, dl) < 0) { - ERROR("Failed calling initializers for module \"%s\"", module_name); + PERROR("Failed calling initializers for module \"%s\"", module_name); goto error; } diff --git a/src/lib/util/dl.c b/src/lib/util/dl.c index 80892cb0909f..43c52869fe1b 100644 --- a/src/lib/util/dl.c +++ b/src/lib/util/dl.c @@ -257,7 +257,10 @@ int dl_symbol_init(dl_loader_t *dl_loader, dl_t const *dl) } } - if (init->func(dl, sym, init->uctx) < 0) return -1; + if (init->func(dl, sym, init->uctx) < 0) { + fr_strerror_printf("Iinitialiser \"%s\" failed", buffer); + return -1; + } } return 0;