forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/x86/entry/syscalls/syscallhdr.sh
....@@ -15,14 +15,21 @@
1515 echo "#define ${fileguard} 1"
1616 echo ""
1717
18
+ max=0
1819 while read nr abi name entry ; do
1920 if [ -z "$offset" ]; then
2021 echo "#define __NR_${prefix}${name} $nr"
2122 else
2223 echo "#define __NR_${prefix}${name} ($offset + $nr)"
2324 fi
25
+
26
+ max=$nr
2427 done
2528
2629 echo ""
30
+ echo "#ifdef __KERNEL__"
31
+ echo "#define __NR_${prefix}syscall_max $max"
32
+ echo "#endif"
33
+ echo ""
2734 echo "#endif /* ${fileguard} */"
2835 ) > "$out"