[Mesa-dev] [PATCH 3/3] gbm: Log at least one dlerror() when we fail to open any drivers.

Eric Anholt eric at anholt.net
Thu Jul 17 16:56:41 PDT 2014


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).
---
 src/gbm/backends/dri/gbm_dri.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index f421a03..4a19011 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -245,6 +245,7 @@ dri_load_driver(struct gbm_dri_device *dri)
    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 -1;
    }
 
-- 
2.0.0



More information about the mesa-dev mailing list