From c69e4c37b37c816c7dbd307a6e7d2d2a5cfe8788 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Sun, 24 Feb 2019 20:06:39 +0100 Subject: perf tools: Add rm_rf_perf_data function To remove perf.data including the directory, with checking on expected files and no other directories inside. Signed-off-by: Jiri Olsa Suggested-by: Andi Kleen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190224190656.30163-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/util.h') diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index ece040b799f6..01c538027c6f 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -31,6 +31,7 @@ struct strlist; int mkdir_p(char *path, mode_t mode); int rm_rf(const char *path); +int rm_rf_perf_data(const char *path); struct strlist *lsdir(const char *name, bool (*filter)(const char *, struct dirent *)); bool lsdir_no_dot_filter(const char *name, struct dirent *d); int copyfile(const char *from, const char *to); -- cgit