Skip to content

Commit d8ed87b

Browse files
Ravi Bangoriaacmel
authored andcommitted
perf buildid-cache: Warn --purge-all failures
Warn perf buildid-cache --purge-all failures in non verbose mode. Ex.: $ sudo chown root:root /home/ravi/.debug -R $ sudo chmod 700 /home/ravi/.debug/ -R $ ./perf buildid-cache -P Couldn't remove some caches. Error: Permission denied. Suggested-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20180510043651.12189-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent b3f58c8 commit d8ed87b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎tools/perf/builtin-buildid-cache.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,12 @@ int cmd_buildid_cache(int argc, const char **argv)
488488
}
489489
}
490490

491-
if (purge_all)
492-
ret = build_id_cache__purge_all();
491+
if (purge_all) {
492+
if (build_id_cache__purge_all()) {
493+
pr_warning("Couldn't remove some caches. Error: %s.\n",
494+
str_error_r(errno, sbuf, sizeof(sbuf)));
495+
}
496+
}
493497

494498
if (missing_filename)
495499
ret = build_id_cache__fprintf_missing(session, stdout);

0 commit comments

Comments
 (0)