summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2019-04-02 17:03:13 -0400
committerJan Vesely <[email protected]>2019-04-10 22:17:09 -0400
commit6ec9733b9f16e94dc3b3a0e6f9e88bced6955e86 (patch)
tree75096c3f02c0d85344f4c009947eb84206df4591 /src/gallium/auxiliary/pipe-loader
parent2b780fe89300199f2334539aa1678e9b68f0434f (diff)
gallium/aux: Report error if loading of a pipe driver fails.
Skip over non-existent files. Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 6fd15527e53..fc8ee8e8dcd 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -31,6 +31,7 @@
#include "util/u_memory.h"
#include "util/u_string.h"
#include "util/u_dl.h"
+#include "util/u_file.h"
#include "util/xmlconfig.h"
#include "util/xmlpool.h"
@@ -158,11 +159,13 @@ pipe_loader_find_module(const char *driver_name,
ret = util_snprintf(path, sizeof(path), "%s%s%s",
MODULE_PREFIX, driver_name, UTIL_DL_EXT);
- if (ret > 0 && ret < sizeof(path)) {
+ if (ret > 0 && ret < sizeof(path) && u_file_access(path, 0) != -1) {
lib = util_dl_open(path);
if (lib) {
return lib;
}
+ fprintf(stderr, "ERROR: Failed to load pipe driver at `%s': %s\n",
+ path, util_dl_error());
}
}