From 764402d8b945f7abbfa5f68a6d16c94c635f7ffe Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 21:22:58 +0200 Subject: Merging upstream version 2.40.1. Signed-off-by: Daniel Baumann --- tools/all_syscalls | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/all_syscalls b/tools/all_syscalls index 9c14778..eccb0d0 100755 --- a/tools/all_syscalls +++ b/tools/all_syscalls @@ -1,15 +1,18 @@ #!/bin/bash set -e +set -o pipefail +SED="$1" +shift OUTPUT=syscalls.h SYSCALL_INCLUDES=" #include " -trap 'rm $OUTPUT $OUTPUT.deps' ERR +trap 'rm -f $OUTPUT $OUTPUT.deps' ERR "$@" -MD -MF "$OUTPUT.deps" <<< "$SYSCALL_INCLUDES" -dM -E - \ - | gawk 'match($0, /^#define __NR_([^ ]+)/, res) { print "UL_SYSCALL(\"" res[1] "\", __NR_" res[1] ")" }' \ + | "$SED" -n -e 's/^#define __NR_\([^ ]*\).*$/UL_SYSCALL("\1", __NR_\1)/p' \ | sort \ > "$OUTPUT" -- cgit v1.2.3