summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@imgtec.com>2017-10-30 15:27:25 +0000
committerEric Engestrom <eric.engestrom@imgtec.com>2017-10-31 17:59:29 +0000
commitd830351bfa454a560aa0566a9d22aff910bcf456 (patch)
treeb7d23cb0879b5b082a899762c9b2af105b50b4c9
parent4e43ba5687b840f9c2a42375f6a434d7829fd762 (diff)
gbm: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rwxr-xr-xsrc/gbm/gbm-symbols-check11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check
index 2444131e99..cf57a08d57 100755
--- a/src/gbm/gbm-symbols-check
+++ b/src/gbm/gbm-symbols-check
@@ -1,6 +1,15 @@
#!/bin/sh
+set -eu
-FUNCS=$(nm -D --defined-only ${1-.libs/libgbm.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libgbm.so}
+
+if ! [ -f "$LIB" ]
+then
+ exit 1
+fi
+
+
+FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
gbm_device_get_fd
gbm_device_get_backend_name