#!/bin/sh # SPDX-License-Identifier: GPL-2.0-only # # Generate a syscall number header. # # Each line of the syscall table should have the following format: # # NR ABI NAME [NATIVE] [COMPAT] # # NR syscall number # ABI ABI name # NAME syscall name # NATIVE native entry point (optional) # COMPAT compat entry point (optional)
set -e
usage() { echo >&2 "usage: $0 [--abis ABIS] [--prefix PREFIX] INFILE OUTFILE" >&2 echo >&2 echo >&2 " INFILE input syscall table" echo >&2 " OUTFILE output header file" echo >&2 echo >&2 "options:" echo >&2 " --abis ABIS ABI(s) to handle (By default, all lines are handled)" echo >&2 " --prefix PREFIX The prefix to the macro like __NR_"
exit 1
}
# default unless specified by options
abis=
prefix=
while [ $# -gt 0 ] do
case $1 in
--abis)
abis=$(echo"($2)" | tr ',''|')
shift 2;;
--prefix)
prefix=$2
shift 2;;
-*) echo"$1: unknown option" >&2
usage;;
*)
break;;
esac done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.