summaryrefslogtreecommitdiff
path: root/tools/perf/util/data.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-20 10:32:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-20 10:32:33 -0700
commit200bde278d78318cbd10cd865f94016924e76c56 (patch)
treec90dc9b383ec777b304a1a34e931a741e807fe48 /tools/perf/util/data.c
parent404ca80eb5c2727d78cd517d12108b040c522e12 (diff)
parentfd741edc25600e1660abd00b5c1bbe967018c6a0 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf tooling fixes from Ingo Molnar: "Three small tooling fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Improve error reporting perf tools: Adjust symbols in VDSO perf kvm: Fix 'Min time' counting in report command
Diffstat (limited to 'tools/perf/util/data.c')
-rw-r--r--tools/perf/util/data.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 1fbcd8bdc11b..55de44ecebef 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file)
static int open_file_write(struct perf_data_file *file)
{
+ int fd;
+
if (check_backup(file))
return -1;
- return open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR);
+ fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR);
+
+ if (fd < 0)
+ pr_err("failed to open %s : %s\n", file->path, strerror(errno));
+
+ return fd;
}
static int open_file(struct perf_data_file *file)