2011-11-12 07:55:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
in="$1"
|
|
|
|
out="$2"
|
|
|
|
|
2016-01-29 07:11:21 +08:00
|
|
|
emit() {
|
|
|
|
abi="$1"
|
|
|
|
nr="$2"
|
|
|
|
entry="$3"
|
|
|
|
compat="$4"
|
|
|
|
if [ -n "$compat" ]; then
|
|
|
|
echo "__SYSCALL_${abi}($nr, $entry, $compat)"
|
|
|
|
elif [ -n "$entry" ]; then
|
|
|
|
echo "__SYSCALL_${abi}($nr, $entry, $entry)"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-11-12 07:55:49 +08:00
|
|
|
grep '^[0-9]' "$in" | sort -n | (
|
|
|
|
while read nr abi name entry compat; do
|
|
|
|
abi=`echo "$abi" | tr '[a-z]' '[A-Z]'`
|
2016-01-29 07:11:21 +08:00
|
|
|
emit "$abi" "$nr" "$entry" "$compat"
|
2011-11-12 07:55:49 +08:00
|
|
|
done
|
|
|
|
) > "$out"
|