aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@arm.com>2018-06-29 13:46:52 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-07-11 09:01:51 -0400
commitf6432b9f65001651412dbc3589d251534822d4ab (patch)
tree34fc4f3cffd3b3163aae11721a2922654e96a3be /tools
parent98c6c8a1d00fba66625311730f80c6ceaa9c1d19 (diff)
perf llvm-utils: Remove bashism from kernel include fetch script
Like system(), popen() calls /bin/sh, which may/may not be bash. Script when run on dash and encounters the line, yields: exit: Illegal number: -1 checkbashisms report on script content: possible bashism (exit|return with negative status code): exit -1 Remove the bashism and use the more portable non-zero failure status code 1. Signed-off-by: Kim Phillips <kim.phillips@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sandipan Das <sandipan@linux.vnet.ibm.com> Cc: Thomas Richter <tmricht@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20180629124652.8d0af7e2281fd3fd8262cacc@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/llvm-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 976e658e38dc..5e94857dfca2 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -266,16 +266,16 @@ static const char *kinc_fetch_script =
266"#!/usr/bin/env sh\n" 266"#!/usr/bin/env sh\n"
267"if ! test -d \"$KBUILD_DIR\"\n" 267"if ! test -d \"$KBUILD_DIR\"\n"
268"then\n" 268"then\n"
269" exit -1\n" 269" exit 1\n"
270"fi\n" 270"fi\n"
271"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n" 271"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
272"then\n" 272"then\n"
273" exit -1\n" 273" exit 1\n"
274"fi\n" 274"fi\n"
275"TMPDIR=`mktemp -d`\n" 275"TMPDIR=`mktemp -d`\n"
276"if test -z \"$TMPDIR\"\n" 276"if test -z \"$TMPDIR\"\n"
277"then\n" 277"then\n"
278" exit -1\n" 278" exit 1\n"
279"fi\n" 279"fi\n"
280"cat << EOF > $TMPDIR/Makefile\n" 280"cat << EOF > $TMPDIR/Makefile\n"
281"obj-y := dummy.o\n" 281"obj-y := dummy.o\n"