Re: [PATCH] perf stat: Do not show stats if workload fails
From: David Ahern
Date: Mon Dec 23 2013 - 19:30:44 EST
On 12/23/13, 2:37 PM, Arnaldo Carvalho de Melo wrote:
int perf_evlist__start_workload(struct perf_evlist *evlist)
{
if (evlist->workload.cork_fd > 0) {
char bf = 0;
int ret;
/*
* Remove the cork, let it rip!
*/
ret = write(evlist->workload.cork_fd, &bf, 1);
if (ret < 0)
perror("enable to write to pipe");
close(evlist->workload.cork_fd);
return ret;
}
return 0;
}
Ret there is 1, so we need to change it to:
return ret != 1 ? -1 : 0;
Right?
Yes, nice catch.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/