swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: bbf5c979011a099af5dc76498918ed7df445635b authored by Linus Torvalds on 11 October 2020, 21:15:50 UTC
Linux 5.9
Tip revision: bbf5c97
syscalltbl.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
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"
back to top