]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
scripts/bash_aliases: grep_syscall[_def](): Fix bug that couldn't find syscalls with...
authorAlejandro Colomar <alx.manpages@gmail.com>
Sat, 2 Apr 2022 20:58:03 +0000 (22:58 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Sat, 2 Apr 2022 21:20:39 +0000 (23:20 +0200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
scripts/bash_aliases

index b7a484e32617d4e21b1c1d21d9d085570876b48d..5d1b891bdc0516e0716ee25b3bcd6b772fd36526 100644 (file)
@@ -54,7 +54,7 @@ function grep_syscall()
        |grep '\.c$' \
        |xargs grep -l "${1}" \
        |sort \
-       |xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
+       |xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1}\b.*?\)" \
        |sed -E 's/^[^:]+:[0-9]+:/&\n/';
 
        find * -type f \
@@ -81,7 +81,7 @@ function grep_syscall_def()
        |grep '\.c$' \
        |xargs grep -l "${1}" \
        |sort \
-       |xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?^}" \
+       |xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1}\b.*?^}" \
        |sed -E 's/^[^:]+:[0-9]+:/&\n/';
 }