• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/awk -f
2#
3# Dumb script that can be used to strip all of the syscall information from
4# the arch-respective unistd*.h.
5#
6# Examples:
7#
8# 1. Grab the i386 32-bit syscalls from unistd_32.h and put them in i386.in
9# strip_syscall.awk arch/x86/include/asm/unistd_32.h > i386.in
10#
11
12/^#define[[:space:]]+__NR_[0-9a-z]+/ {
13
14	sub (/#define[[:space:]]+__NR_/, "", $0);
15	sub (/[[:space:]]*(\/\*.*)/, "", $0);
16	sub (/[[:space:]]+/, " ", $0);
17
18	print
19}
20