aboutsummaryrefslogtreecommitdiffstats
path: root/dev/new-access-flags
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-access-flags
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-access-flags')
-rwxr-xr-xdev/new-access-flags14
1 files changed, 14 insertions, 0 deletions
diff --git a/dev/new-access-flags b/dev/new-access-flags
new file mode 100755
index 0000000..8f9ee7d
--- /dev/null
+++ b/dev/new-access-flags
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+cd -- "$(dirname -- "$0")"
+
+cat ../print.c | \
+ sed '1,/^print_access_flags\s*(/d;1,/^\s*FLAGS_BEGIN\b/d;/^\s*FLAGS_END_DEFAULT\b/q' | \
+ tr \(\) ,, | cut -d , -f 2 | sort \
+ > .access-flags.old
+
+cat /usr/include/unistd.h | tr '\t' ' ' | \
+ grep ' *[^ ]\+_OK\b' | grep -o '[^ ]\+_OK' | sort \
+ > .access-flags.new
+
+exec diff -u .access-flags.old .access-flags.new