diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2010-02-04 03:46:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-04 04:03:03 -0500 |
commit | f887f3019e56389a73617f4e70f512e82cc89adb (patch) | |
tree | 176b13e6d9713715d1b4eef75e702b47e6923606 /tools/perf/util/session.c | |
parent | 447a194b393f32699607fd99617a40abd6a95114 (diff) |
perf tools: Clean up O_LARGEFILE et al usage
Setting _FILE_OFFSET_BITS and using O_LARGEFILE, lseek64, etc,
is redundant. Thanks H. Peter Anvin for pointing it out.
So, this patch removes O_LARGEFILE, lseek64, etc.
Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4B6A8972.3070605@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 74cbc64a3a3c..0de7258e70a5 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #define _LARGEFILE64_SOURCE | ||
2 | #define _FILE_OFFSET_BITS 64 | 1 | #define _FILE_OFFSET_BITS 64 |
3 | 2 | ||
4 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
@@ -15,7 +14,7 @@ static int perf_session__open(struct perf_session *self, bool force) | |||
15 | { | 14 | { |
16 | struct stat input_stat; | 15 | struct stat input_stat; |
17 | 16 | ||
18 | self->fd = open(self->filename, O_RDONLY|O_LARGEFILE); | 17 | self->fd = open(self->filename, O_RDONLY); |
19 | if (self->fd < 0) { | 18 | if (self->fd < 0) { |
20 | pr_err("failed to open file: %s", self->filename); | 19 | pr_err("failed to open file: %s", self->filename); |
21 | if (!strcmp(self->filename, "perf.data")) | 20 | if (!strcmp(self->filename, "perf.data")) |