syscalltbl.sh 609 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. in="$1"
  4. out="$2"
  5. my_abis=`echo "($3)" | tr ',' '|'`
  6. grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
  7. while read nr abi name entry compat; do
  8. if [ "$abi" = "eabi" -a -n "$compat" ]; then
  9. echo "$in: error: a compat entry for an EABI syscall ($name) makes no sense" >&2
  10. exit 1
  11. fi
  12. if [ -n "$entry" ]; then
  13. if [ -z "$compat" ]; then
  14. echo "NATIVE($nr, $entry)"
  15. else
  16. echo "COMPAT($nr, $entry, $compat)"
  17. fi
  18. fi
  19. done
  20. ) > "$out"