kbuild: redo fake deps at include/ksym/*.h
[linux-2.6-microblaze.git] / scripts / syscalltbl.sh
index aa6ab15..6abe143 100755 (executable)
@@ -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))