]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: grepc_linux_syscall_def: Improve readability of regex
authorAlejandro Colomar <alx.manpages@gmail.com>
Tue, 10 May 2022 16:46:46 +0000 (18:46 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:54 +0000 (21:28 +0100)
This improves the readability of the regex, and also the
robustness, at the cost of just a few ms.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index bd7b823e2286d1407b98d40075a23c5adf2e5151..b1b8b06a23b8a686f414b6835c5a397f2375feb3 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -101,7 +101,7 @@ function grepc_linux_syscall_def()
        grepc_helper \
          "SYSCALL_DEFINE.\($1\b" \
          '.' \
-         "(?s)^\w*SYSCALL_DEFINE.\($1\b.*?^}";
+         "(?s)^(COMPAT_)?SYSCALL_DEFINE.\($1\b.*?^}";
 }