From a3509bac24a01d0d46c142821b520f2e63e96163 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Sun, 8 Apr 2018 20:09:06 +0200 Subject: [PATCH] bpf: add support for array fields * gen_bpf_attr_check.sh: Ignore field array size definition. * m4/gen_bpf_attr_m4.sh (filter_entries): Likewise. Co-Authored-by: Dmitry V. Levin --- gen_bpf_attr_check.sh | 2 +- m4/gen_bpf_attr_m4.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_bpf_attr_check.sh b/gen_bpf_attr_check.sh index 9da75ad9..1a52c217 100755 --- a/gen_bpf_attr_check.sh +++ b/gen_bpf_attr_check.sh @@ -44,7 +44,7 @@ for struct in $(sed -n 's/^struct \(BPF_[^[:space:]]\+_struct\) .*/\1/p' < "$inp enum="$enum${enum:+.}" ENUM="$ENUM${ENUM:+_}" sed -n '/^struct '"$struct"' [^{]*{/,/^};$/p' < "$input" | - sed -n 's/^[[:space:]]\+[^;]*[[:space:]]\([^[:space:];]\+\);$/\1/p' | + sed -n 's/^[[:space:]]\+[^][;]*[[:space:]]\([^][[:space:];]\+\)\(\[[^;]*\]\)\?;$/\1/p' | while read field; do FIELD="$(printf %s "$field" |tr '[:lower:]' '[:upper:]')" cat <