summaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-10-30 15:27:25 +0000
committerEric Engestrom <[email protected]>2017-10-31 17:59:29 +0000
commitd830351bfa454a560aa0566a9d22aff910bcf456 (patch)
treeb7d23cb0879b5b082a899762c9b2af105b50b4c9 /src/gbm
parent4e43ba5687b840f9c2a42375f6a434d7829fd762 (diff)
gbm: fail symbol check if lib is missing
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gbm')
-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 2444131e990..cf57a08d572 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