Commit 9bc9f3b6 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Arnaldo Carvalho de Melo

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
          @<vfs_read+0>
                  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
          @<vfs_read+0>
                  char*   buf
                  loff_t* pos
                  size_t  count
                  struct file*    file
  succeeded!
  ----
Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150506124645.4961.56973.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b8dc3984
......@@ -523,5 +523,5 @@ int cmd_probe(int argc, const char **argv, const char *prefix)
cleanup_params();
}
return ret;
return ret < 0 ? ret : 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment