lkml.org 
[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/6] perf util: hint missing file when tool tips fail to load
    Date
    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
    \
     
     \ /
      Last update: 2017-04-12 08:51    [W:7.794 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site