[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241222215831.283248-1-linux@treblig.org>
Date: Sun, 22 Dec 2024 21:58:31 +0000
From: linux@...blig.org
To: irogers@...gle.com,
peterz@...radead.org,
mingo@...hat.com,
acme@...nel.org,
namhyung@...nel.org,
mark.rutland@....com,
alexander.shishkin@...ux.intel.com,
jolsa@...nel.org,
adrian.hunter@...el.com,
kan.liang@...ux.intel.com
Cc: linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Dr. David Alan Gilbert" <linux@...blig.org>
Subject: [PATCH] perf tools: Remove unused is_executable_file
From: "Dr. David Alan Gilbert" <linux@...blig.org>
is_executable_file() has been unused since 2022's
commit 7391db645938 ("perf test: Refactor shell tests allowing subdirs")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
---
tools/perf/util/path.c | 12 ------------
tools/perf/util/path.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
index 00adf872bf00..e923e2d9e8ad 100644
--- a/tools/perf/util/path.c
+++ b/tools/perf/util/path.c
@@ -67,15 +67,3 @@ bool is_directory(const char *base_path, const struct dirent *dent)
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 d94902c22222..083429b7efa3 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -12,6 +12,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_executable_file(const char *base_path, const struct dirent *dent);
#endif /* _PERF_PATH_H */
--
2.47.1
Powered by blists - more mailing lists