diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-12-15 03:53:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-15 04:31:32 -0500 |
commit | 8f11d85a0e7e9025acea7493e6864089c8b52f42 (patch) | |
tree | 9de666c26df99502cae53f3912614d18fba22283 /tools/perf/util | |
parent | a3a7cb7bb1d7bd989982314cf6f90ec392890006 (diff) |
perf trace/scripting: Check return val of perl_run()
The return value from perl_run() is currently ignored, but it
should be checked and used to exit perf if there are problems
loading the script.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
LKML-Reference: <1260867220-15699-4-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/trace-event-perl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event-perl.c b/tools/perf/util/trace-event-perl.c index 6f10e7602452..6d6d76b8a21e 100644 --- a/tools/perf/util/trace-event-perl.c +++ b/tools/perf/util/trace-event-perl.c | |||
@@ -379,7 +379,11 @@ static int perl_start_script(const char *script, int argc, const char **argv) | |||
379 | goto error; | 379 | goto error; |
380 | } | 380 | } |
381 | 381 | ||
382 | perl_run(my_perl); | 382 | if (perl_run(my_perl)) { |
383 | err = -1; | ||
384 | goto error; | ||
385 | } | ||
386 | |||
383 | if (SvTRUE(ERRSV)) { | 387 | if (SvTRUE(ERRSV)) { |
384 | err = -1; | 388 | err = -1; |
385 | goto error; | 389 | goto error; |