summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <linux@treblig.org>2024-12-22 21:58:31 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-12-23 13:53:08 -0300
commite5de3f9da5243a57747d0d4a4385a960205dfbb2 (patch)
tree260ef6d35625837c4d187af0a668b82353fe5ed1 /tools
parent2f4847b5d62cdfb8814edde178d094d0a9392ee0 (diff)
perf path: Remove unused is_executable_file()
is_executable_file() has been unused since 2022's commit 7391db6459388d47 ("perf test: Refactor shell tests allowing subdirs") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Carsten Haitzler <carsten.haitzler@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241222215831.283248-1-linux@treblig.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/path.c12
-rw-r--r--tools/perf/util/path.h1
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 */