You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
451 B
20 lines
451 B
#!/usr/bin/awk -f
|
|
#
|
|
# Dumb script that can be used to strip all of the syscall information from
|
|
# the arch-respective unistd*.h.
|
|
#
|
|
# Examples:
|
|
#
|
|
# 1. Grab the i386 32-bit syscalls from unistd_32.h and put them in i386.in
|
|
# strip_syscall.awk arch/x86/include/asm/unistd_32.h > i386.in
|
|
#
|
|
|
|
/^#define[[:space:]]+__NR_[0-9a-z]+/ {
|
|
|
|
sub (/#define[[:space:]]+__NR_/, "", $0);
|
|
sub (/[[:space:]]*(\/\*.*)/, "", $0);
|
|
sub (/[[:space:]]+/, " ", $0);
|
|
|
|
print
|
|
}
|