[Mesa-dev] [PATCH mesa 02/11] wayland-egl: fail symbol check if lib is missing

Eric Engestrom eric.engestrom at imgtec.com
Tue Oct 31 11:19:59 UTC 2017


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 src/egl/wayland/wayland-egl/wayland-egl-symbols-check | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/egl/wayland/wayland-egl/wayland-egl-symbols-check b/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
index e7105ea5793784a7ca16..04b2dbf1d37677031720 100755
--- a/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
+++ b/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
@@ -1,6 +1,14 @@
 #!/bin/sh
+set -eu
 
-FUNCS=$(nm -D --defined-only ${1-.libs/libwayland-egl.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libwayland-egl.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
 wl_egl_window_resize
 wl_egl_window_create
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list