swh:1:snp:c2847dfd741eae21606027cf29250d1ebcd63fb4
Raw File
Tip revision: 2e6e902d185027f8e3cb8b7305238f7e35d6a436 authored by Linus Torvalds on 25 November 2018, 22:19:31 UTC
Linux 4.20-rc4
Tip revision: 2e6e902
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