summaryrefslogtreecommitdiffstats
path: root/arch/x86/syscalls/syscallhdr.sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/syscalls/syscallhdr.sh')
-rw-r--r--arch/x86/syscalls/syscallhdr.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/syscalls/syscallhdr.sh b/arch/x86/syscalls/syscallhdr.sh
index b3c5930..31fd5f1 100644
--- a/arch/x86/syscalls/syscallhdr.sh
+++ b/arch/x86/syscalls/syscallhdr.sh
@@ -15,7 +15,11 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
echo ""
while read nr abi name entry ; do
- echo "#define __NR_${prefix}${name}" $((nr+offset))
+ if [ -z "$offset" ]; then
+ echo "#define __NR_${prefix}${name} $nr"
+ else
+ echo "#define __NR_${prefix}${name} ($offset + $nr)"
+ fi
done
echo ""
OpenPOWER on IntegriCloud