perf record: Use correct return type for write()

write() returns a 'ssize_t' not an 'int'.

Signed-off-by: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
Adrian Hunter 2013-11-08 12:27:50 +02:00 • committed by Arnaldo Carvalho de Melo
commit 410f178603

View file

@ -81,7 +81,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size)
struct perf_data_file *file = &rec->file;
while (size) {
int ret = write(file->fd, buf, size);
ssize_t ret = write(file->fd, buf, size);
if (ret < 0) {
pr_err("failed to write perf data, error: %m\n");