aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-08-31 09:09:33 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2011-08-31 09:09:33 -0700
commit39ef08d6464758794f0d7024f13c239ef26d46a1 (patch)
tree2de9e760076ff7bbace7bce5af9d74399541c088 /scripts
parentfcb8ce5cfe30ca9ca5c9a79cdfe26d1993e65e0c (diff)
downloadautogen-39ef08d6464758794f0d7024f13c239ef26d46a1.tar.gz
autogen-39ef08d6464758794f0d7024f13c239ef26d46a1.tar.xz
autogen-39ef08d6464758794f0d7024f13c239ef26d46a1.zip
x86: generate the system call table from a pattern file
Have a single source for all system call information, eliminating duplicate tables. This generates both the dispatch table and headers from a single table file. This will also make x32 a lot easier to implement. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checksyscalls.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index 3ab316e5231..d24810fc6af 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -198,11 +198,16 @@ EOF
}
syscall_list() {
-sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\
-\#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\
-\#warning syscall \1 not implemented\
-\#endif/p' $1
+ grep '^[0-9]' "$1" | sort -n | (
+ while read nr abi name entry ; do
+ echo <<EOF
+#if !defined(__NR_${name}) && !defined(__IGNORE_${name})
+#warning syscall ${name} not implemented
+#endif
+EOF
+ done
+ )
}
-(ignore_list && syscall_list $(dirname $0)/../arch/x86/include/asm/unistd_32.h) | \
+(ignore_list && syscall_list $(dirname $0)/../arch/x86/syscalls/syscall_32.tbl) | \
$* -E -x c - > /dev/null