diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:23:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:23:00 +0000 |
commit | 803b3a091c225d48395508a8f9ffa6e08cbddc5b (patch) | |
tree | a3168c9e7da8991c423b5978aacf90c3c2b135c1 /tools | |
parent | Releasing progress-linux version 2.40-8~progress7.99u1. (diff) | |
download | util-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.tar.xz util-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.zip |
Merging upstream version 2.40.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | tools/all_syscalls | 7 |
1 files changed, 5 insertions, 2 deletions
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 <sys/syscall.h> " -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" |