X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=scripts%2Fsyscalltbl.sh;h=6abe143889ef6d293ada078ae2e52f7cc8f1669d;hb=bc7cd2dd1f8e5889cc68b69984033ac5bef6ba61;hp=aa6ab156301c1bda009d5081507827dc29620a2c;hpb=6ebae23c072bb865048d2b2500ee1fae71944263;p=linux-2.6-microblaze.git diff --git a/scripts/syscalltbl.sh b/scripts/syscalltbl.sh index aa6ab156301c..6abe143889ef 100755 --- a/scripts/syscalltbl.sh +++ b/scripts/syscalltbl.sh @@ -52,10 +52,15 @@ outfile="$2" nxt=0 -grep -E "^[0-9]+[[:space:]]+$abis" "$infile" | sort -n | { +grep -E "^[0-9]+[[:space:]]+$abis" "$infile" | { while read nr abi name native compat ; do + if [ $nxt -gt $nr ]; then + echo "error: $infile: syscall table is not sorted or duplicates the same syscall number" >&2 + exit 1 + fi + while [ $nxt -lt $nr ]; do echo "__SYSCALL($nxt, sys_ni_syscall)" nxt=$((nxt + 1))