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:]]+),.*'