From ab5c381b13d71bff20166a1c0b1d4e8ea1ebefec Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Nov 2023 18:46:14 +0100 Subject: Add system calls and scripts for finding new and extended system calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dev/new-syscalls | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 dev/new-syscalls (limited to 'dev/new-syscalls') diff --git a/dev/new-syscalls b/dev/new-syscalls new file mode 100755 index 0000000..1db64ec --- /dev/null +++ b/dev/new-syscalls @@ -0,0 +1,16 @@ +#!/bin/sh +set -e +cd -- "$(dirname -- "$0")" + +cat ../print.c | \ + sed '1,/^print_systemcall\s*(/d;1,/^\s*switch\s*(/d;/^\s*default\s*:/q' | \ + sed '$d' | tr \(\) ,, | cut -d , -f 2 | sort \ + > .syscalls.old + +(cat /usr/include/bits/syscall.h | \ + grep '#\s*define' | grep -o 'SYS[^ ]*' | cut -d _ -f 2-; \ + cat .syscalls.old) | \ + sort | uniq \ + > .syscalls.new + +exec diff -u .syscalls.old .syscalls.new -- cgit v1.2.3-70-g09d2