summaryrefslogtreecommitdiff
path: root/scripts/syscalltbl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/syscalltbl.sh')
-rwxr-xr-xscripts/syscalltbl.sh7
1 files changed, 6 insertions, 1 deletions
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))