From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NckJt-0001uo-7o for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:51:21 -0500 Received: from [199.232.76.173] (port=40641 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NckJs-0001uC-HC for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:51:20 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NckJq-0002F0-Se for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:51:20 -0500 Received: from mail-iw0-f172.google.com ([209.85.223.172]:48832) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NckJq-0002Et-4h for qemu-devel@nongnu.org; Wed, 03 Feb 2010 13:51:18 -0500 Received: by iwn2 with SMTP id 2so1880717iwn.19 for ; Wed, 03 Feb 2010 10:51:17 -0800 (PST) Message-ID: <4B69C5A0.2090006@codemonkey.ws> Date: Wed, 03 Feb 2010 12:51:12 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/7] qemu-option: Make qemu_opts_foreach() accumulate return values References: <1264790942-15045-1-git-send-email-armbru@redhat.com> <1264790942-15045-2-git-send-email-armbru@redhat.com> In-Reply-To: <1264790942-15045-2-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On 01/29/2010 12:48 PM, Markus Armbruster wrote: > Return the bitwise inclusive or of all return values instead of the > last call's value. This lets you find out whether any of the calls > returned a non-zero value. > > No functional change, as existing users either don't care for the > value, or pass non-zero abort_on_failure, which breaks the loop on the > first non-zero return value. > > Signed-off-by: Markus Armbruster > Applied all. Thanks. It's great to see you working on this. I'm really happy with how qdev has turned out but it desperately needs better online help. Regards, Anthony Liguori > --- > qemu-option.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qemu-option.c b/qemu-option.c > index 24392fc..a52a4c4 100644 > --- a/qemu-option.c > +++ b/qemu-option.c > @@ -814,7 +814,7 @@ int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque, > int rc = 0; > > QTAILQ_FOREACH(opts,&list->head, next) { > - rc = func(opts, opaque); > + rc |= func(opts, opaque); > if (abort_on_failure&& rc != 0) > break; > } >