diff options
-rw-r--r-- | tools/perf/util/path.c | 12 | ||||
-rw-r--r-- | tools/perf/util/path.h | 1 |
2 files changed, 0 insertions, 13 deletions
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index 9712466c51e2..2e62f272fda8 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c @@ -77,15 +77,3 @@ bool is_directory_at(int dir_fd, const char *path) return S_ISDIR(st.st_mode); } - -bool is_executable_file(const char *base_path, const struct dirent *dent) -{ - char path[PATH_MAX]; - struct stat st; - - snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name); - if (stat(path, &st)) - return false; - - return !S_ISDIR(st.st_mode) && (st.st_mode & S_IXUSR); -} diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h index fbafbe7015dd..fb850fb55c60 100644 --- a/tools/perf/util/path.h +++ b/tools/perf/util/path.h @@ -13,6 +13,5 @@ int path__join3(char *bf, size_t size, const char *path1, const char *path2, con bool is_regular_file(const char *file); bool is_directory(const char *base_path, const struct dirent *dent); bool is_directory_at(int dir_fd, const char *path); -bool is_executable_file(const char *base_path, const struct dirent *dent); #endif /* _PERF_PATH_H */ |