aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 05714d548584..ef09f26e67da 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -370,15 +370,11 @@ static int write_cmdline(int fd, struct perf_header *h __maybe_unused,
370 struct perf_evlist *evlist __maybe_unused) 370 struct perf_evlist *evlist __maybe_unused)
371{ 371{
372 char buf[MAXPATHLEN]; 372 char buf[MAXPATHLEN];
373 char proc[32];
374 u32 n; 373 u32 n;
375 int i, ret; 374 int i, ret;
376 375
377 /* 376 /* actual path to perf binary */
378 * actual atual path to perf binary 377 ret = readlink("/proc/self/exe", buf, sizeof(buf) - 1);
379 */
380 sprintf(proc, "/proc/%d/exe", getpid());
381 ret = readlink(proc, buf, sizeof(buf));
382 if (ret <= 0) 378 if (ret <= 0)
383 return -1; 379 return -1;
384 380