Skip to content

Commit f6432b9

Browse files
kim-phillips-armacmel
authored andcommitted
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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Hendrik Brueckner <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Thomas Richter <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 98c6c8a commit f6432b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/perf/util/llvm-utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,16 @@ static const char *kinc_fetch_script =
266266
"#!/usr/bin/env sh\n"
267267
"if ! test -d \"$KBUILD_DIR\"\n"
268268
"then\n"
269-
" exit -1\n"
269+
" exit 1\n"
270270
"fi\n"
271271
"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
272272
"then\n"
273-
" exit -1\n"
273+
" exit 1\n"
274274
"fi\n"
275275
"TMPDIR=`mktemp -d`\n"
276276
"if test -z \"$TMPDIR\"\n"
277277
"then\n"
278-
" exit -1\n"
278+
" exit 1\n"
279279
"fi\n"
280280
"cat << EOF > $TMPDIR/Makefile\n"
281281
"obj-y := dummy.o\n"

0 commit comments

Comments
 (0)