From: Arnaldo Carvalho de Melo Date: Mon, 8 Nov 2021 13:34:06 +0000 (-0300) Subject: perf beauty socket: Prep to receive more input header files X-Git-Tag: baikal/mips/sdk6.1~7046^2~63 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=9b9584ab5b7b410e37386c5cd973c7c0ee37c27c;p=kernel.git 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 --- diff --git a/tools/perf/trace/beauty/socket.sh b/tools/perf/trace/beauty/socket.sh index e08a3fb880dd8..789b3d8c6bcce 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:]]+),.*'