diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-20 09:53:55 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-20 09:53:55 +0200 |
commit | fd741edc25600e1660abd00b5c1bbe967018c6a0 (patch) | |
tree | 2b0b1e74a2859a102e17cdfe96dc187db64481e0 /tools/perf/util/data.c | |
parent | 24223657806a0ebd0ae5c9caaf7b021091889cf2 (diff) | |
parent | ffa91880a992ec1aaee4b4f7c9ddffda0c277ba9 (diff) | |
download | linux-fd741edc25600e1660abd00b5c1bbe967018c6a0.tar.bz2 |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/urgent
Pull perf/urgent fixes from Jiri Olsa:
User visible changes:
* Adjust symbols in VDSO to properly resolve its function names (Vladimir Nikulichev)
* Improve error reporting for record session failure (Adrien BAK)
* Fix 'Min time' counting in report command (Alexander Yarygin)
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/data.c')
-rw-r--r-- | tools/perf/util/data.c | 9 |
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) |