diff mbox series

[v3,1/3] devtools: fix orphan symbols check with busybox

Message ID 20210513083415.32187-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series [v3,1/3] devtools: fix orphan symbols check with busybox | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand May 13, 2021, 8:34 a.m. UTC
Avoid relying on GNU grep --exclude option.

Fixes: f8ad40dc998c ("devtools: check orphan symbols in map files")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-symbol-maps.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index f06353fc75..08451ef5aa 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -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