aboutsummaryrefslogtreecommitdiffstats
path: root/dev/new-syscalls
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-11-26 18:46:14 +0100
committerMattias Andrée <maandree@kth.se>2023-11-26 18:46:14 +0100
commitab5c381b13d71bff20166a1c0b1d4e8ea1ebefec (patch)
tree20b0e41af90ec5140dbcf957a5b30b8069bdbcfc /dev/new-syscalls
parentm (diff)
downloadsctrace-ab5c381b13d71bff20166a1c0b1d4e8ea1ebefec.tar.gz
sctrace-ab5c381b13d71bff20166a1c0b1d4e8ea1ebefec.tar.bz2
sctrace-ab5c381b13d71bff20166a1c0b1d4e8ea1ebefec.tar.xz
Add system calls and scripts for finding new and extended system calls
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'dev/new-syscalls')
-rwxr-xr-xdev/new-syscalls16
1 files changed, 16 insertions, 0 deletions
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