Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752334AbbEJHFZ (ORCPT ); Sun, 10 May 2015 03:05:25 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44640 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752273AbbEJHFQ (ORCPT ); Sun, 10 May 2015 03:05:16 -0400 Date: Sun, 10 May 2015 00:04:40 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, ananth@in.ibm.com, peterz@infradead.org, tglx@linutronix.de, hemant@linux.vnet.ibm.com, namhyung@kernel.org, jolsa@redhat.com, hpa@zytor.com, mingo@kernel.org, masami.hiramatsu.pt@hitachi.com Reply-To: tglx@linutronix.de, hemant@linux.vnet.ibm.com, peterz@infradead.org, ananth@in.ibm.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, acme@redhat.com, masami.hiramatsu.pt@hitachi.com, mingo@kernel.org, jolsa@redhat.com, hpa@zytor.com, namhyung@kernel.org In-Reply-To: <20150506124645.4961.56973.stgit@localhost.localdomain> References: <20150506124645.4961.56973.stgit@localhost.localdomain> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf probe: Fix to return 0 when positive value returned Git-Commit-ID: 9bc9f3b6800e8de16f40a2da1d6ded3a391ea01a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2277 Lines: 65 Commit-ID: 9bc9f3b6800e8de16f40a2da1d6ded3a391ea01a Gitweb: http://git.kernel.org/tip/9bc9f3b6800e8de16f40a2da1d6ded3a391ea01a Author: Masami Hiramatsu AuthorDate: Wed, 6 May 2015 21:46:45 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 May 2015 16:05:01 -0300 perf probe: Fix to return 0 when positive value returned Fix to return 0 when positive value returned from probe command. At least --vars can returns a positive value if it found a point. ---- # perf probe --vars vfs_read && echo succeeded! || echo failed! Available variables at vfs_read @ char* buf loff_t* pos size_t count struct file* file failed! ---- This fixes above problem. ---- # perf probe --vars vfs_read && echo succeeded! || echo failed! Available variables at vfs_read @ char* buf loff_t* pos size_t count struct file* file succeeded! ---- Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Ananth N Mavinakayanahalli Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150506124645.4961.56973.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 53d475b..9c4cf5e 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -523,5 +523,5 @@ int cmd_probe(int argc, const char **argv, const char *prefix) cleanup_params(); } - return ret; + return ret < 0 ? ret : 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/