Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / sh / kernel / syscalls / syscalltbl.sh
blob904b8e6e625d29f9fcfc082605a10108b6b4838d
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
4 in="$1"
5 out="$2"
6 my_abis=`echo "($3)" | tr ',' '|'`
7 my_abi="$4"
8 offset="$5"
10 emit() {
11 t_nxt="$1"
12 t_nr="$2"
13 t_entry="$3"
15 while [ $t_nxt -lt $t_nr ]; do
16 printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}"
17 t_nxt=$((t_nxt+1))
18 done
19 printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}"
22 grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
23 nxt=0
24 if [ -z "$offset" ]; then
25 offset=0
28 while read nr abi name entry ; do
29 emit $((nxt+offset)) $((nr+offset)) $entry
30 nxt=$((nr+1))
31 done
32 ) > "$out"