projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98c6c8a
)
perf llvm-utils: Remove bashism from kernel include fetch script
author
Kim Phillips
<
[email protected]
>
Fri, 29 Jun 2018 17:46:52 +0000
(12:46 -0500)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 11 Jul 2018 13:01:51 +0000
(10:01 -0300)
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]
>
tools/perf/util/llvm-utils.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/llvm-utils.c
b/tools/perf/util/llvm-utils.c
index 976e658e38dce762163bb583f1ab02b39231a742..5e94857dfca2c8c47ae289b79dd2a717ae4a82b5 100644
(file)
--- a/
tools/perf/util/llvm-utils.c
+++ b/
tools/perf/util/llvm-utils.c
@@
-266,16
+266,16
@@
static const char *kinc_fetch_script =
"#!/usr/bin/env sh\n"
"if ! test -d \"$KBUILD_DIR\"\n"
"then\n"
-" exit
-
1\n"
+" exit 1\n"
"fi\n"
"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
"then\n"
-" exit
-
1\n"
+" exit 1\n"
"fi\n"
"TMPDIR=`mktemp -d`\n"
"if test -z \"$TMPDIR\"\n"
"then\n"
-" exit
-
1\n"
+" exit 1\n"
"fi\n"
"cat << EOF > $TMPDIR/Makefile\n"
"obj-y := dummy.o\n"