0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 SYSCALL_TBL=$1
0011
0012 if ! test -r $SYSCALL_TBL; then
0013 echo "Could not read input file" >&2
0014 exit 1
0015 fi
0016
0017 create_table()
0018 {
0019 local max_nr nr abi sc discard
0020
0021 echo 'static const char *syscalltbl_s390_64[] = {'
0022 while read nr abi sc discard; do
0023 printf '\t[%d] = "%s",\n' $nr $sc
0024 max_nr=$nr
0025 done
0026 echo '};'
0027 echo "#define SYSCALLTBL_S390_64_MAX_ID $max_nr"
0028 }
0029
0030 grep -E "^[[:digit:]]+[[:space:]]+(common|64)" $SYSCALL_TBL \
0031 |sort -k1 -n \
0032 |create_table