Skip to content

Commit d854bb9

Browse files
kim-phillips-armZhengShunQian
authored andcommitted
perf llvm-utils: Remove bashism from kernel include fetch script
[ Upstream commit f6432b9 ] 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]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e254596 commit d854bb9

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
@@ -254,16 +254,16 @@ static const char *kinc_fetch_script =
254254
"#!/usr/bin/env sh\n"
255255
"if ! test -d \"$KBUILD_DIR\"\n"
256256
"then\n"
257-
" exit -1\n"
257+
" exit 1\n"
258258
"fi\n"
259259
"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
260260
"then\n"
261-
" exit -1\n"
261+
" exit 1\n"
262262
"fi\n"
263263
"TMPDIR=`mktemp -d`\n"
264264
"if test -z \"$TMPDIR\"\n"
265265
"then\n"
266-
" exit -1\n"
266+
" exit 1\n"
267267
"fi\n"
268268
"cat << EOF > $TMPDIR/Makefile\n"
269269
"obj-y := dummy.o\n"

0 commit comments

Comments
 (0)