summaryrefslogtreecommitdiff
path: root/arch/arm/tools/syscalltbl.sh
blob: 5ca834545ed3275685f471dd8914f70ce8e66403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
in="$1"
out="$2"
my_abis=`echo "($3)" | tr ',' '|'`

grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
    while read nr abi name entry compat; do
        if [ "$abi" = "eabi" -a -n "$compat" ]; then
            echo "$in: error: a compat entry for an EABI syscall ($name) makes no sense" >&2
            exit 1
        fi

	if [ -n "$entry" ]; then
            if [ -z "$compat" ]; then
                echo "NATIVE($nr, $entry)"
            else
                echo "COMPAT($nr, $entry, $compat)"
            fi
        fi
    done
) > "$out"