diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index bf29aed16bd614c3eab63ff31716790272e73c49..d8b45cea54d08233c3d743cc38c6c0ef7af90328 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -85,7 +85,7 @@ int mkdir_p(char *path, mode_t mode) return (stat(path, &st) && mkdir(path, mode)) ? -1 : 0; } -int rm_rf(char *path) +int rm_rf(const char *path) { DIR *dir; int ret = 0; diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 6e8be174ec0bef94dc2323d67327a000d073743a..c74708da857129356e2a308cd987dec34f371104 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -209,7 +209,7 @@ static inline int sane_case(int x, int high) } int mkdir_p(char *path, mode_t mode); -int rm_rf(char *path); +int rm_rf(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);