aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Balagopalakrishnan2015-12-19 07:09:37 -0600
committerAnand Balagopalakrishnan2015-12-19 07:13:51 -0600
commit96f37555c7e82a417b02051661377b10e6b3966e (patch)
tree59bc308c719e8d8ce69ca26b56022e8de75f1e7b
parent43cc786d0e5b8274fa93048c7f3bb8d6b62522db (diff)
downloadexternal-libgbm-96f37555c7e82a417b02051661377b10e6b3966e.tar.gz
external-libgbm-96f37555c7e82a417b02051661377b10e6b3966e.tar.xz
external-libgbm-96f37555c7e82a417b02051661377b10e6b3966e.zip
gbm: differentiate between a valid DL load and symbol found
There could be a case where the dlopen succeeds but the gbm_backend symbol is not found. Add print messages to differentiate the two cases. Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
-rw-r--r--backend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend.c b/backend.c
index 29d31517..d56dfb9c 100644
--- a/backend.c
+++ b/backend.c
@@ -62,6 +62,9 @@ load_backend(const char *name)
62 fprintf(stderr, "failed to load module: %s\n", dlerror()); 62 fprintf(stderr, "failed to load module: %s\n", dlerror());
63 return NULL; 63 return NULL;
64 } 64 }
65 else {
66 fprintf(stderr, "loaded module : %s\n", name);
67 }
65 68
66 return dlsym(module, entrypoint); 69 return dlsym(module, entrypoint);
67} 70}
@@ -85,7 +88,7 @@ _gbm_create_device(int fd)
85 backend = load_backend(backends[i]); 88 backend = load_backend(backends[i]);
86 if (backend == NULL) 89 if (backend == NULL)
87 continue; 90 continue;
88 fprintf(stderr, "loaded module: %s\n", backends[i]); 91 fprintf(stderr, "found valid GBM backend : %s\n", backends[i]);
89 dev = backend->create_device(fd); 92 dev = backend->create_device(fd);
90 } 93 }
91 94