From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqMXd-0002NQ-SI for qemu-devel@nongnu.org; Sat, 13 Mar 2010 03:17:50 -0500 Received: from [199.232.76.173] (port=54541 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqMXb-0002Me-EP for qemu-devel@nongnu.org; Sat, 13 Mar 2010 03:17:48 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NqMXa-0003Nj-D1 for qemu-devel@nongnu.org; Sat, 13 Mar 2010 03:17:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NqMXa-0003NX-1m for qemu-devel@nongnu.org; Sat, 13 Mar 2010 03:17:46 -0500 Message-ID: <4B9B4A21.50001@redhat.com> Date: Sat, 13 Mar 2010 10:17:37 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] CODING_STYLE: Reserve qemu_ prefix for library wrappers References: <4B98FA68.7000901@codemonkey.ws> <1268318923-13397-1-git-send-email-avi@redhat.com> <20100313025525.GA27110@laped.iglesias.mooo.com> In-Reply-To: <20100313025525.GA27110@laped.iglesias.mooo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: qemu-devel@nongnu.org On 03/13/2010 04:55 AM, Edgar E. Iglesias wrote: > On Thu, Mar 11, 2010 at 04:48:43PM +0200, Avi Kivity wrote: > >> Signed-off-by: Avi Kivity >> --- >> CODING_STYLE | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/CODING_STYLE b/CODING_STYLE >> index a579cb1..92036f3 100644 >> --- a/CODING_STYLE >> +++ b/CODING_STYLE >> @@ -49,6 +49,9 @@ and is therefore likely to be changed. >> Typedefs are used to eliminate the redundant 'struct' keyword. It is the >> QEMU coding style. >> >> +When wrapping standard library functions, use the prefix qemu_ to alert >> +readers that they are seeing a wrapped version; otherwise avoid this prefix. >> + >> 4. Block structure >> >> Every indented statement is braced; even if the block contains just one >> > > Not sure what "standard library functions" includes but I think the > qemu prefix should be allowed whenever one needs to wrap external > code blocks into qemu. > > That was the intent. > I don't feel very strongly about this though. I can call my stuff > wrap_xxx if I need to :) > > A downside of a formal coding style document is that people start lawyering about it. Common sense can still be applied, if there is a use case that is similar to what is described, surely qemu_ can still hold. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.