Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399874

[tip:perf/core] perf tools: Fix lsdir to set errno correctly

From tip-bot for Masami Hiramatsu <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:perf/core] perf tools: Fix lsdir to set errno correctly
Date 2016-05-12 12:30 +0200
Message-ID <rxW2w-3Gh-43@gated-at.bofh.it> (permalink)
References <rxCQa-UH-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  357a54f32a065835d3e6a08b07a91a57e52f32c7
Gitweb:     http://git.kernel.org/tip/357a54f32a065835d3e6a08b07a91a57e52f32c7
Author:     Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Wed, 11 May 2016 22:51:27 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 11 May 2016 13:06:05 -0300

perf tools: Fix lsdir to set errno correctly

Fix lsdir() to set correct positive error number (ENOMEM).  Since
"errno" must have a positive error number instead of negative number,
fix lsdir to set it correctly.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: e1ce726e1db2 ("perf tools: Add lsdir() helper to read a directory")
Link: http://lkml.kernel.org/r/20160511135127.23943.40644.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 01c9433..eab077a 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -139,7 +139,7 @@ struct strlist *lsdir(const char *name,
 
 	list = strlist__new(NULL, NULL);
 	if (!list) {
-		errno = -ENOMEM;
+		errno = ENOMEM;
 		goto out;
 	}
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH perf/core v7 00/21] perf-probe --cache and SDT support Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 18/21] perf-list: Skip SDTs placed in invalid binaries Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 07/21] perf symbol: Cleanup the code flow of dso__find_kallsyms Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
    Re: [PATCH perf/core v7 07/21] perf symbol: Cleanup the code flow of  dso__find_kallsyms Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-11 18:00 +0200
      Re: [PATCH perf/core v7 07/21] perf symbol: Cleanup the code flow  of dso__find_kallsyms Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-12 03:50 +0200
  [PATCH perf/core v7 17/21] perf-list: Show SDT and pre-cached events Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 16/21] perf probe: Accept %sdt and %cached event name Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 10/21] perf probe: Use cache entry if possible Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 15/21] perf buildid-cache: Scan and import user SDT events to probe cache Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 01/21] tools/perf: Fix lsdir to set errno correctly Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
    [tip:perf/core] perf tools: Fix lsdir to set errno correctly tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2016-05-12 12:30 +0200
  [PATCH perf/core v7 20/21] perf probe: Support @BUILDID or @FILE suffix for SDT events Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 19/21] perf probe: Allow wildcard for cached events Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 02/21] perf buildid: Fix to set correct dso name for kallsyms Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
    Re: [PATCH perf/core v7 02/21] perf buildid: Fix to set correct dso  name for kallsyms Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-11 17:50 +0200
      Re: [PATCH perf/core v7 02/21] perf buildid: Fix to set correct dso  name for kallsyms Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-12 04:10 +0200
        Re: [PATCH perf/core v7 02/21] perf buildid: Fix to set correct dso  name for kallsyms Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-12 11:00 +0200
  [PATCH perf/core v7 09/21] perf probe: Add --cache option to cache the probe definitions Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:00 +0200
  [PATCH perf/core v7 03/21] perf buildid: Introduce DSO__NAME_KALLSYMS and DSO__NAME_KCORE Masami Hiramatsu <mhiramat@kernel.org> - 2016-05-11 16:10 +0200
    Re: [PATCH perf/core v7 03/21] perf buildid: Introduce  DSO__NAME_KALLSYMS and DSO__NAME_KCORE Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-11 17:50 +0200

csiph-web