summaryrefslogtreecommitdiff
path: root/src/arch-syscall-validate
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch-syscall-validate')
-rwxr-xr-xsrc/arch-syscall-validate30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate
index 69849bd..6264de0 100755
--- a/src/arch-syscall-validate
+++ b/src/arch-syscall-validate
@@ -319,6 +319,28 @@ function dump_lib_mips64n32() {
}
#
+# Dump the s390 library syscall table
+#
+# Dump the library's syscall table to stdout.
+#
+function dump_lib_s390() {
+ $LIB_SYS_DUMP -a s390 | grep -v - | sort
+}
+
+#
+# Dump the s390 system syscall table
+#
+# Arguments:
+# 1 path to the kernel source
+#
+# Dump the architecture's syscall table to stdout.
+#
+function dump_sys_s390() {
+ gcc -dM -m31 -E $1/arch/s390/include/uapi/asm/unistd.h | grep __NR | \
+ sed 's/#define __NR_//g' | sed 's/ /\t/g' | sort
+}
+
+#
# Dump the s390x library syscall table
#
# Dump the library's syscall table to stdout.
@@ -375,6 +397,9 @@ function dump_sys() {
mips64n32)
dump_sys_mips64n32 "$2"
;;
+ s390)
+ dump_sys_s390 "$2"
+ ;;
s390x)
dump_sys_s390x "$2"
;;
@@ -418,6 +443,9 @@ function dump_lib() {
mips64n32)
dump_lib_mips64n32
;;
+ s390)
+ dump_lib_s390 "$2"
+ ;;
s390x)
dump_lib_s390x "$2"
;;
@@ -467,7 +495,7 @@ shift $(($OPTIND - 1))
# defaults
if [[ $opt_arches == "" ]]; then
- opt_arches="x86 x86_64 x32 arm aarch64 mips mips64 mips64n32 s390x"
+ opt_arches="x86 x86_64 x32 arm aarch64 mips mips64 mips64n32 s390 s390x"
fi
# sanity checks