* 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 <ldv@altlinux.org>
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 <<EOF
local subtype=
[ -z "$name" ] ||
subtype=".$name"
- local search='^[[:space:]]\+[^;]*[[:space:]]\([^[:space:];]\+\);$'
+ local search='^[[:space:]]\+[^][;]*[[:space:]]\([^][[:space:];]\+\)\(\[[^;]*\]\)\?;$'
local replacement='\t\tunion bpf_attr'"$subtype"'.\1,'
sed -n "s/$search/$replacement/p" |
sort -u