diff options
| author | Jiri Olsa <jolsa@redhat.com> | 2010-02-25 12:40:47 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-25 12:58:49 -0500 |
| commit | 80e0863e9bd35c61ce42716a0839fde0796326f6 (patch) | |
| tree | d6441ba364842bcb4a49f80a1a4db808e3f5d290 | |
| parent | 21a0e32c889a24ac664cf9de38c4786ebc88dd24 (diff) | |
trace-record: Fix bug with using wrong file descriptor
tracecmd_create_recorder opens with fd, but then incorrectly checks
recorder->fd.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
LKML-Reference: <1267119647-16775-1-git-send-email-jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | trace-record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-record.c b/trace-record.c index cdfc857..2a754b9 100644 --- a/trace-record.c +++ b/trace-record.c | |||
| @@ -116,7 +116,7 @@ struct tracecmd_recorder *tracecmd_create_recorder(const char *file, int cpu) | |||
| 116 | int fd; | 116 | int fd; |
| 117 | 117 | ||
| 118 | fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0644); | 118 | fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0644); |
| 119 | if (recorder->fd < 0) | 119 | if (fd < 0) |
| 120 | return NULL; | 120 | return NULL; |
| 121 | 121 | ||
| 122 | recorder = tracecmd_create_recorder_fd(fd, cpu); | 122 | recorder = tracecmd_create_recorder_fd(fd, cpu); |
