diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2016-03-23 18:25:02 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-03-23 18:27:33 +0000 |
| commit | cf47a8aede9febee21cbd21d40a9c47244773a6c (patch) | |
| tree | 954ece73f022c29ef84e08d39cf10a275c8b3a39 /tools/perf/util/path.c | |
| parent | perf tools: Do not include stringify.h from the kernel sources (diff) | |
| download | kernel-cf47a8aede9febee21cbd21d40a9c47244773a6c.tar.gz kernel-cf47a8aede9febee21cbd21d40a9c47244773a6c.zip | |
perf tools: Remove unused perf_pathdup, xstrdup functions
Cc: Adrian Hunter <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/path.c')
| -rw-r--r-- | tools/perf/util/path.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index 3654d964e49d..3bf6bf82ff2d 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c @@ -41,36 +41,6 @@ static char *cleanup_path(char *path) return path; } -static char *perf_vsnpath(char *buf, size_t n, const char *fmt, va_list args) -{ - const char *perf_dir = get_perf_dir(); - size_t len; - - len = strlen(perf_dir); - if (n < len + 1) - goto bad; - memcpy(buf, perf_dir, len); - if (len && !is_dir_sep(perf_dir[len-1])) - buf[len++] = '/'; - len += vsnprintf(buf + len, n - len, fmt, args); - if (len >= n) - goto bad; - return cleanup_path(buf); -bad: - strlcpy(buf, bad_path, n); - return buf; -} - -char *perf_pathdup(const char *fmt, ...) -{ - char path[PATH_MAX]; - va_list args; - va_start(args, fmt); - (void)perf_vsnpath(path, sizeof(path), fmt, args); - va_end(args); - return xstrdup(path); -} - char *mkpath(const char *fmt, ...) { va_list args; |
