qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] CODING_STYLE: Reserve qemu_ prefix for library


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] CODING_STYLE: Reserve qemu_ prefix for library wrappers
Date: Sat, 13 Mar 2010 10:17:37 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

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<address@hidden>
---
  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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]