diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-08 10:34:06 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-12 10:40:34 -0300 |
commit | 1a1edf33206c30b51638effa72a6940b7bc7618f (patch) | |
tree | 819a798b3c7300264b9a30c6bb254561a0435cab /tools | |
parent | 012e5690360c542fa18694587c3f2e5392ddd475 (diff) | |
download | linux-1a1edf33206c30b51638effa72a6940b7bc7618f.tar.gz linux-1a1edf33206c30b51638effa72a6940b7bc7618f.tar.bz2 linux-1a1edf33206c30b51638effa72a6940b7bc7618f.zip |
perf beauty socket: Prep to receive more input header files
Move from ternary like expression to an if block, this way we'll
have just the extra lines for new files in the following patches.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/perf/trace/beauty/socket.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/trace/beauty/socket.sh b/tools/perf/trace/beauty/socket.sh index e08a3fb880dd..789b3d8c6bcc 100755 --- a/tools/perf/trace/beauty/socket.sh +++ b/tools/perf/trace/beauty/socket.sh @@ -1,7 +1,11 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 -[ $# -eq 1 ] && uapi_header_dir=$1 || uapi_header_dir=tools/include/uapi/linux/ +if [ $# -gt 0 ] ; then + uapi_header_dir=$1 +else + uapi_header_dir=tools/include/uapi/linux/ +fi printf "static const char *socket_ipproto[] = {\n" regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*' |