Failing to load a module that does not exist is indeed not an error,
but failing to load a module that exists on disk happened probably
because of an error like "symbol not found".
Considering eina_module is most likely used by EFL itself, I believe
an internal linking failure is a warning worth reporting.
if (!dl_handle)
{
- DBG("could not dlopen(\"%s\", %s): %s", m->file, dlerror(),
- (flag == RTLD_NOW) ? "RTLD_NOW" : "RTLD_LAZY");
+ struct stat st;
+ if (!stat(m->file, &st))
+ WRN("could not dlopen(\"%s\", %s): %s", m->file, dlerror(),
+ (flag == RTLD_NOW) ? "RTLD_NOW" : "RTLD_LAZY");
+ else
+ DBG("could not dlopen(\"%s\", %s): %s", m->file, dlerror(),
+ (flag == RTLD_NOW) ? "RTLD_NOW" : "RTLD_LAZY");
return EINA_FALSE;
}