Lines Matching +full:name +full:- +full:prefix
2 # SPDX-License-Identifier: GPL-2.0-only
8 # NR ABI NAME [NATIVE] [COMPAT]
11 # ABI ABI name
12 # NAME syscall name
16 set -e
19 …echo >&2 "usage: $0 [--abis ABIS] [--emit-nr] [--offset OFFSET] [--prefix PREFIX] INFILE OUTFILE" …
25 echo >&2 " --abis ABIS ABI(s) to handle (By default, all lines are handled)"
26 echo >&2 " --emit-nr Emit the macro of the number of syscalls (__NR_syscalls)"
27 echo >&2 " --offset OFFSET The offset of syscall numbers"
28 echo >&2 " --prefix PREFIX The prefix to the macro like __NR_<PREFIX><NAME>"
36 prefix=
38 while [ $# -gt 0 ]
41 --abis)
44 --emit-nr)
47 --offset)
50 --prefix)
51 prefix=$2
53 -*)
61 if [ $# -ne 2 ]; then
69 sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
70 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g')
72 grep -E "^[0-9A-Fa-fXx]+[[:space:]]+$abis" "$infile" | {
78 while read nr abi name native compat ; do
82 if [ -n "$offset" ]; then
86 echo "#define __NR_$prefix$name $nr"
89 if [ -n "$emit_nr" ]; then
92 echo "#define __NR_${prefix}syscalls $(($max + 1))"