From e5de3f9da5243a57747d0d4a4385a960205dfbb2 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 22 Dec 2024 21:58:31 +0000 Subject: 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 Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Carsten Haitzler Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241222215831.283248-1-linux@treblig.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/path.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'tools/perf/util/path.c') 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); -} -- cgit v1.2.3