public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Tom Zanussi <tzanussi@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	tzanussi@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf trace/scripting: Check return val of perl_run()
Date: Tue, 15 Dec 2009 09:40:01 GMT	[thread overview]
Message-ID: <tip-8f11d85a0e7e9025acea7493e6864089c8b52f42@git.kernel.org> (raw)
In-Reply-To: <1260867220-15699-4-git-send-email-tzanussi@gmail.com>

Commit-ID:  8f11d85a0e7e9025acea7493e6864089c8b52f42
Gitweb:     http://git.kernel.org/tip/8f11d85a0e7e9025acea7493e6864089c8b52f42
Author:     Tom Zanussi <tzanussi@gmail.com>
AuthorDate: Tue, 15 Dec 2009 02:53:37 -0600
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 15 Dec 2009 10:31:32 +0100

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>
---
 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 6f10e76..6d6d76b 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)
 		goto error;
 	}
 
-	perl_run(my_perl);
+	if (perl_run(my_perl)) {
+		err = -1;
+		goto error;
+	}
+
 	if (SvTRUE(ERRSV)) {
 		err = -1;
 		goto error;

  reply	other threads:[~2009-12-15  9:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15  8:53 [PATCH 0/6] perf trace/scripting updates Tom Zanussi
2009-12-15  8:53 ` [PATCH 1/6] perf trace/scripting: add support for script args Tom Zanussi
2009-12-15  9:39   ` [tip:perf/urgent] perf trace/scripting: Add " tip-bot for Tom Zanussi
2009-12-15  8:53 ` [PATCH 2/6] perf trace/scripting: don't install unneeded files Tom Zanussi
2009-12-15  9:39   ` [tip:perf/urgent] perf trace/scripting: Don't " tip-bot for Tom Zanussi
2009-12-15  8:53 ` [PATCH 3/6] perf trace/scripting: check return val of perl_run() Tom Zanussi
2009-12-15  9:40   ` tip-bot for Tom Zanussi [this message]
2009-12-15  8:53 ` [PATCH 4/6] perf trace/scripting: list available scripts Tom Zanussi
2009-12-15  9:40   ` [tip:perf/urgent] perf trace/scripting: List " tip-bot for Tom Zanussi
2009-12-15  8:53 ` [PATCH 5/6] perf trace/scripting: add 'record' and 'report' options Tom Zanussi
2009-12-15  9:40   ` [tip:perf/urgent] perf trace/scripting: Add " tip-bot for Tom Zanussi
2009-12-15  8:53 ` [PATCH 6/6] perf trace/scripting: update Documentation Tom Zanussi
2009-12-15  9:40   ` [tip:perf/urgent] perf trace/scripting: Update Documentation tip-bot for Tom Zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-8f11d85a0e7e9025acea7493e6864089c8b52f42@git.kernel.org \
    --to=tzanussi@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox