diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:50:55 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:50:55 -0500 |
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) | |||
604 | static int perf_header__getbuffer64(struct perf_header *self, | 604 | static int perf_header__getbuffer64(struct perf_header *self, |
605 | int fd, void *buf, size_t size) | 605 | int fd, void *buf, size_t size) |
606 | { | 606 | { |
607 | if (do_read(fd, buf, size) <= 0) | 607 | if (readn(fd, buf, size) <= 0) |
608 | return -1; | 608 | return -1; |
609 | 609 | ||
610 | if (self->needs_swap) | 610 | if (self->needs_swap) |
@@ -660,7 +660,7 @@ int perf_file_header__read(struct perf_file_header *self, | |||
660 | { | 660 | { |
661 | lseek(fd, 0, SEEK_SET); | 661 | lseek(fd, 0, SEEK_SET); |
662 | 662 | ||
663 | if (do_read(fd, self, sizeof(*self)) <= 0 || | 663 | if (readn(fd, self, sizeof(*self)) <= 0 || |
664 | memcmp(&self->magic, __perf_magic, sizeof(self->magic))) | 664 | memcmp(&self->magic, __perf_magic, sizeof(self->magic))) |
665 | return -1; | 665 | return -1; |
666 | 666 | ||
@@ -821,7 +821,7 @@ static int perf_file_header__read_pipe(struct perf_pipe_file_header *self, | |||
821 | struct perf_header *ph, int fd, | 821 | struct perf_header *ph, int fd, |
822 | bool repipe) | 822 | bool repipe) |
823 | { | 823 | { |
824 | if (do_read(fd, self, sizeof(*self)) <= 0 || | 824 | if (readn(fd, self, sizeof(*self)) <= 0 || |
825 | memcmp(&self->magic, __perf_magic, sizeof(self->magic))) | 825 | memcmp(&self->magic, __perf_magic, sizeof(self->magic))) |
826 | return -1; | 826 | return -1; |
827 | 827 | ||