summaryrefslogtreecommitdiff
path: root/tools/perf/util/path.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-12-06 18:45:35 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-12-27 12:15:48 -0300
commit06c3f2aa9fc68e7f3fe3d83e7569d2a2801d9f99 (patch)
tree36061880d13768b6761cdf2e6aac9a76be5d15e1 /tools/perf/util/path.h
parent29734550c996c259ffa8d32198439d6fe4b51320 (diff)
perf utils: Move is_directory() to path.h
So that it can be used more widely, like in the next patch, when it will be used to fix a bug in 'perf test' handling of dirent.d_type == DT_UNKNOWN. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20171206174535.25380-1-jolsa@kernel.org [ Split from a larger patch, removed needless includes in path.h ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/path.h')
-rw-r--r--tools/perf/util/path.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h
index 14a254ada7eb..f014f905df50 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -2,9 +2,12 @@
#ifndef _PERF_PATH_H
#define _PERF_PATH_H
+struct dirent;
+
int path__join(char *bf, size_t size, const char *path1, const char *path2);
int path__join3(char *bf, size_t size, const char *path1, const char *path2, const char *path3);
bool is_regular_file(const char *file);
+bool is_directory(const char *base_path, const struct dirent *dent);
#endif /* _PERF_PATH_H */