diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 16:50:55 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 16:50:55 -0200 |
commit | 1e7972cc5c16e06f258b0278d8c9adfb5aa75c68 (patch) | |
tree | b73bbe4083bba9e345474fd17082d8a179f93157 /tools/perf/util/header.c | |
parent | daec78a09de3df5fbfbbd167da0304d49d7fcfe5 (diff) |
perf util: Move do_read from session to util
Not really something to be exported from session.c. Rename it to
'readn' as others did in the past.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index ecb5a8444f42..05dec98fc3ff 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -604,7 +604,7 @@ int perf_header__write(struct perf_header *self, int fd, bool at_exit) static int perf_header__getbuffer64(struct perf_header *self, int fd, void *buf, size_t size) { - if (do_read(fd, buf, size) <= 0) + if (readn(fd, buf, size) <= 0) return -1; if (self->needs_swap) @@ -660,7 +660,7 @@ int perf_file_header__read(struct perf_file_header *self, { lseek(fd, 0, SEEK_SET); - if (do_read(fd, self, sizeof(*self)) <= 0 || + if (readn(fd, self, sizeof(*self)) <= 0 || memcmp(&self->magic, __perf_magic, sizeof(self->magic))) return -1; @@ -821,7 +821,7 @@ static int perf_file_header__read_pipe(struct perf_pipe_file_header *self, struct perf_header *ph, int fd, bool repipe) { - if (do_read(fd, self, sizeof(*self)) <= 0 || + if (readn(fd, self, sizeof(*self)) <= 0 || memcmp(&self->magic, __perf_magic, sizeof(self->magic))) return -1; |