From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOZls-0004IZ-Vx for qemu-devel@nongnu.org; Wed, 08 Jul 2009 12:13:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOZlo-0004Fo-0M for qemu-devel@nongnu.org; Wed, 08 Jul 2009 12:13:24 -0400 Received: from [199.232.76.173] (port=34717 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOZln-0004Fj-Mh for qemu-devel@nongnu.org; Wed, 08 Jul 2009 12:13:19 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56518) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOZlm-0006gL-BE for qemu-devel@nongnu.org; Wed, 08 Jul 2009 12:13:18 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n68GDH0U025064 for ; Wed, 8 Jul 2009 12:13:17 -0400 Message-ID: <4A54C634.30007@redhat.com> Date: Wed, 08 Jul 2009 19:15:48 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands References: <1247064963.3270.63.camel@blaa> <1247065048-15706-1-git-send-email-markmc@redhat.com> <1247065048-15706-2-git-send-email-markmc@redhat.com> <1247065048-15706-3-git-send-email-markmc@redhat.com> <4A54BABD.3040903@redhat.com> <1247069035.3270.82.camel@blaa> In-Reply-To: <1247069035.3270.82.camel@blaa> 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: Mark McLoughlin Cc: qemu-devel@nongnu.org On 07/08/2009 07:03 PM, Mark McLoughlin wrote: >> The _t namespace is reserved by posix and not used for structures in >> qemu anyway. I see there's precedent a few lines above but let's not >> introduce new violations. >> > > Bah, where there's a number of different styles used in a code base, and > where there's no guidelines in CODING_STYLE, I tend to stick with the > style of the code I'm editing. And, in this case, the closest structure > definition used this style. > > Naming is one of the few things CODING_STYLE does talk about. >>> + >>> + fd = dup(fd); >>> >>> >> Why? >> > > Because it gets closed again after the chr_read() handler finishes. I > guess we could make qemu_chr_get_msgfd() pass ownership of the fd to the > caller. > I'd prefer the communication layer to queue fds and getfd to dequeue them. -- error compiling committee.c: too many arguments to function