Skip to contentSkip to conversation

perf tools: Ditch unused PATH_SEP, STRIP_EXTENSION

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 20, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  28a9bb9621d9f8b4328048297cd306e09fbbf175
Gitweb:     http://git.kernel.org/tip/28a9bb9621d9f8b4328048297cd306e09fbbf175
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 17 Apr 2017 15:39:06 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 19 Apr 2017 13:01:48 -0300

perf tools: Ditch unused PATH_SEP, STRIP_EXTENSION

Should make sense for windows, where git is supported.

---
 tools/perf/perf.c      | 10 ----------
 tools/perf/util/util.h | 16 ----------------
 2 files changed, 26 deletions(-)
tools/perf/perf.c +0 -10
index 07ee135..94e9418 100644
@@ -328,16 +328,6 @@ static void handle_internal_command(int argc, const char **argv)
 {
 	const char *cmd = argv[0];
 	unsigned int i;
-	static const char ext[] = STRIP_EXTENSION;
-
-	if (sizeof(ext) > 1) {
-		i = strlen(argv[0]) - strlen(ext);
-		if (i > 0 && !strcmp(argv[0] + i, ext)) {
-			char *argv0 = strdup(argv[0]);
-			argv[0] = cmd = argv0;
-			argv0[i] = '\0';
-		}
-	}
 
 	/* Turn "perf cmd --help" into "perf help cmd" */
 	if (argc > 1 && !strcmp(argv[1], "--help")) {
tools/perf/util/util.h +0 -16
index aa35509..f26666d 100644
@@ -49,22 +49,6 @@ extern const char *spaces;
 extern const char *dots;
 extern char buildid_dir[];
 
-#ifndef PATH_SEP
-#define PATH_SEP ':'
-#endif
-
-#ifndef STRIP_EXTENSION
-#define STRIP_EXTENSION ""
-#endif
-
-#ifndef has_dos_drive_prefix
-#define has_dos_drive_prefix(path) 0
-#endif
-
-#ifndef is_dir_sep
-#define is_dir_sep(c) ((c) == '/')
-#endif
-
 #ifdef __GNUC__
 #define NORETURN __attribute__((__noreturn__))
 #else