mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
perf beauty socket: Rename 'regex' to 'ipproto_regex'
Paving the way for more regexps to be used here. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
1a1edf3320
commit
82e3664b0a
@ -8,9 +8,9 @@ else
|
||||
fi
|
||||
|
||||
printf "static const char *socket_ipproto[] = {\n"
|
||||
regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*'
|
||||
ipproto_regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*'
|
||||
|
||||
egrep $regex ${uapi_header_dir}/in.h | \
|
||||
sed -r "s/$regex/\2 \1/g" | \
|
||||
egrep $ipproto_regex ${uapi_header_dir}/in.h | \
|
||||
sed -r "s/$ipproto_regex/\2 \1/g" | \
|
||||
sort | xargs printf "\t[%s] = \"%s\",\n"
|
||||
printf "};\n"
|
||||
|
Loading…
Reference in New Issue
Block a user