devtools: fix orphan symbols check with busybox
authorDavid Marchand <david.marchand@redhat.com>
Thu, 13 May 2021 08:34:13 +0000 (10:34 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 May 2021 10:51:00 +0000 (12:51 +0200)
Avoid relying on GNU grep --exclude option.

Fixes: f8ad40dc998c ("devtools: check orphan symbols in map files")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
devtools/check-symbol-maps.sh

index f06353f..055db24 100755 (executable)
@@ -20,8 +20,7 @@ find_orphan_symbols ()
             else
                 symsrc=$sym
             fi
-            if ! grep -q -r --exclude=$(basename $map) \
-                    -w $symsrc $(dirname $map) ; then
+            if [ -z "$(grep -rlw $symsrc $(dirname $map) | grep -v $map)" ] ; then
                 echo "$map: $sym"
             fi
         done