[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52B8D582.9090009@gmail.com>
Date: Mon, 23 Dec 2013 19:29:54 -0500
From: David Ahern <dsahern@...il.com>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf stat: Do not show stats if workload fails
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists