Files
rk35xx-android14/external/ltp/include/lapi/syscalls/strip_syscall.awk
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

20 lines
451 B
Awk
Executable File

#!/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
}