We don't want to log every single error (such as all the ones where the file
wasn't even present in our list of search paths), but if you didn't find any
driver, then seeing at least one error is useful (since the common case as a
developer is a single DEFAULT_DRIVER_DIR or GBM_DRIVERS_PATH entry).
v2: Rebase on swrast changes.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
if (dri->driver == NULL) {
fprintf(stderr, "gbm: failed to open any driver (search paths %s)\n",
search_paths);
+ fprintf(stderr, "gbm: Last dlopen error: %s\n", dlerror());
return NULL;
}