]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf path: Remove unused is_executable_file()
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 22 Dec 2024 21:58:31 +0000 (21:58 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Dec 2024 16:53:08 +0000 (13:53 -0300)
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>
tools/perf/util/path.c
tools/perf/util/path.h

index 9712466c51e2f30efbe622c275c02e3ed4cf2bf8..2e62f272fda8671a5ee08fa29f9b51dd20c0f0bc 100644 (file)
@@ -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);
-}
index fbafbe7015dd0b3fe473671cbe5f4a85ff6de26d..fb850fb55c6099335bdb04983c6e6c34d91bcfab 100644 (file)
@@ -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 */