public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: Remove unused is_executable_file
@ 2024-12-22 21:58 linux
  2024-12-23 16:32 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: linux @ 2024-12-22 21:58 UTC (permalink / raw)
  To: irogers, peterz, mingo, acme, namhyung, mark.rutland,
	alexander.shishkin, jolsa, adrian.hunter, kan.liang
  Cc: linux-perf-users, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.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@treblig.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-23 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22 21:58 [PATCH] perf tools: Remove unused is_executable_file linux
2024-12-23 16:32 ` Arnaldo Carvalho de Melo
2024-12-23 16:33   ` Arnaldo Carvalho de Melo
2024-12-23 16:37     ` Arnaldo Carvalho de Melo
2024-12-23 16:41     ` Dr. David Alan Gilbert
2024-12-23 16:36   ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox