Fix error return value for no-vga-pic-allocation
[qemu-test.git] / util / get-libs.sh
1 #!/bin/sh
2
3 ldd $1 | sed -e 's:.*=> \(.*\):\1:g' | cut -f1 -d'('
4
5 # FIXME need a more generic way of doing this
6 # glibc actually dlopens these libraries so there's no easy way to figure out
7 # from the binary that they are needed... quite annoying
8 if ls /lib64/x86_64-linux-gnu/libnss_dns* 2>/dev/null >/dev/null; then
9 ls /lib64/x86_64-linux-gnu/libnss_dns*
10 ls /lib64/x86_64-linux-gnu/libnss_files*
11 ls /lib64/x86_64-linux-gnu/libresolv*
12 else
13 ls /lib/x86_64-linux-gnu/libnss_dns*
14 ls /lib/x86_64-linux-gnu/libnss_files*
15 ls /lib/x86_64-linux-gnu/libresolv*
16 fi