Messages in this thread Patch in this message | | | From | David Carrillo-Cisneros <> | Subject | [PATCH 3/6] perf util: hint missing file when tool tips fail to load | Date | Tue, 11 Apr 2017 23:49:16 -0700 |
| |
Besides memory allocation failure, tips.txt may fail to load because the file is not found (a more likely cause).
Communicate that to the user in tips failure warning.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> --- tools/perf/util/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index d8b45cea54d0..6097d87429e2 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -696,7 +696,8 @@ const char *perf_tip(const char *dirpath) tips = strlist__new("tips.txt", &conf); if (tips == NULL) - return errno == ENOENT ? NULL : "Tip: get more memory! ;-p"; + return errno == ENOENT ? NULL : + "Tip: check path of tips.txt or get more memory! ;-p"; if (strlist__nr_entries(tips) == 0) goto out; -- 2.12.2.715.g7642488e1d-goog
| |