From 1272be04be0cb803eec87f602edb2e3e6f111aea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:34 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- tools/all_syscalls | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/all_syscalls (limited to 'tools/all_syscalls') diff --git a/tools/all_syscalls b/tools/all_syscalls new file mode 100755 index 0000000..9c14778 --- /dev/null +++ b/tools/all_syscalls @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +OUTPUT=syscalls.h +SYSCALL_INCLUDES=" +#include +" + +trap 'rm $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] ")" }' \ + | sort \ + > "$OUTPUT" -- cgit v1.2.3