mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 03:21:32 +00:00
d181764ccf
Create a simple set of syscall tables and scripts to turn them into both header files (unistd_*.h) and macros for generating the system call tables. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 lines
327 B
Bash
16 lines
327 B
Bash
#!/bin/sh
|
|
|
|
in="$1"
|
|
out="$2"
|
|
|
|
grep '^[0-9]' "$in" | sort -n | (
|
|
while read nr abi name entry compat; do
|
|
abi=`echo "$abi" | tr '[a-z]' '[A-Z]'`
|
|
if [ -n "$compat" ]; then
|
|
echo "__SYSCALL_${abi}($nr, $entry, $compat)"
|
|
elif [ -n "$entry" ]; then
|
|
echo "__SYSCALL_${abi}($nr, $entry, $entry)"
|
|
fi
|
|
done
|
|
) > "$out"
|