Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbbEFMsy (ORCPT ); Wed, 6 May 2015 08:48:54 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:50756 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbbEFMsu (ORCPT ); Wed, 6 May 2015 08:48:50 -0400 X-AuditID: 85900ec0-a0ac7b9000003d4c-62-554a0da526ae Subject: [PATCH perf/core 3/8] [BUGFIX] perf probe: Fix to return 0 when positive value returned From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: ananth@in.ibm.com, Peter Zijlstra , hemant@linux.vnet.ibm.com, Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Date: Wed, 06 May 2015 21:46:45 +0900 Message-ID: <20150506124645.4961.56973.stgit@localhost.localdomain> In-Reply-To: <20150506124638.4961.3172.stgit@localhost.localdomain> References: <20150506124638.4961.3172.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 48 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 --- 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/