Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 06:46:53PM +0100, Peter Maydell wrote: > On 28 August 2012 18:32, Michael S. Tsirkin wrote: > > What about _t in POSIX? That seems fairly safe if name is long and qemu > > specific enough. > > Depends what you mean by "safe". The spec says "don't use this"; > it isn't any

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Peter Maydell
On 28 August 2012 18:32, Michael S. Tsirkin wrote: > What about _t in POSIX? That seems fairly safe if name is long and qemu > specific enough. Depends what you mean by "safe". The spec says "don't use this"; it isn't any different to the __ and _[A-Z] prohibitions in that respect. Other posix n

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 09:33:16PM +0400, malc wrote: > On Tue, 28 Aug 2012, Peter Maydell wrote: > > > On 28 August 2012 18:21, Michael S. Tsirkin wrote: > > > We are talking about stuff like __kvm_pv_eoi - so the chance is exactly 0. > > > And if it does happen then you run a simple script and

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 06:27:59PM +0100, Peter Maydell wrote: > On 28 August 2012 18:21, Michael S. Tsirkin wrote: > > We are talking about stuff like __kvm_pv_eoi - so the chance is exactly 0. > > And if it does happen then you run a simple script and fix > > this one instance. > > Why not just

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Andreas Färber
Am 28.08.2012 18:01, schrieb Michael S. Tsirkin: > We copied HACKING from libvirt but it has some bogus stuff: > neither underscore capital, double underscore, or underscore 't' suffixes > are reserved in Posix/C: this appears to be based on misreading of the > C standard. Using sane prefixes is en

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread malc
On Tue, 28 Aug 2012, Peter Maydell wrote: > On 28 August 2012 18:21, Michael S. Tsirkin wrote: > > We are talking about stuff like __kvm_pv_eoi - so the chance is exactly 0. > > And if it does happen then you run a simple script and fix > > this one instance. > > Why not just use a name that doe

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 06:23:38PM +0100, Peter Maydell wrote: > On 28 August 2012 18:18, Michael S. Tsirkin wrote: > > On Tue, Aug 28, 2012 at 05:24:40PM +0100, Peter Maydell wrote: > >> C99 7.1.3 > >> reserves underscore capital and double underscore prefixes. > > > > This is taking it out of c

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread malc
On Tue, 28 Aug 2012, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 05:24:40PM +0100, Peter Maydell wrote: > > On 28 August 2012 17:01, Michael S. Tsirkin wrote: > > > We copied HACKING from libvirt but it has some bogus stuff: > > > neither underscore capital, double underscore, or undersco

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Peter Maydell
On 28 August 2012 18:21, Michael S. Tsirkin wrote: > We are talking about stuff like __kvm_pv_eoi - so the chance is exactly 0. > And if it does happen then you run a simple script and fix > this one instance. Why not just use a name that doesn't use a double underscore in the first place? The C

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Blue Swirl
On Tue, Aug 28, 2012 at 5:21 PM, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 05:13:24PM +, Blue Swirl wrote: >> On Tue, Aug 28, 2012 at 4:01 PM, Michael S. Tsirkin wrote: >> > We copied HACKING from libvirt but it has some bogus stuff: >> > neither underscore capital, double underscor

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Peter Maydell
On 28 August 2012 18:18, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 05:24:40PM +0100, Peter Maydell wrote: >> C99 7.1.3 >> reserves underscore capital and double underscore prefixes. > > This is taking it out of context - reserved means different > things in different parts of the spec.

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 05:13:24PM +, Blue Swirl wrote: > On Tue, Aug 28, 2012 at 4:01 PM, Michael S. Tsirkin wrote: > > We copied HACKING from libvirt but it has some bogus stuff: > > neither underscore capital, double underscore, or underscore 't' suffixes > > are reserved in Posix/C: this a

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 05:24:40PM +0100, Peter Maydell wrote: > On 28 August 2012 17:01, Michael S. Tsirkin wrote: > > We copied HACKING from libvirt but it has some bogus stuff: > > neither underscore capital, double underscore, or underscore 't' suffixes > > are reserved in Posix/C: this appear

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Blue Swirl
On Tue, Aug 28, 2012 at 4:01 PM, Michael S. Tsirkin wrote: > We copied HACKING from libvirt but it has some bogus stuff: > neither underscore capital, double underscore, or underscore 't' suffixes > are reserved in Posix/C: this appears to be based on misreading of the > C standard. Using sane pre

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Peter Maydell
On 28 August 2012 17:01, Michael S. Tsirkin wrote: > We copied HACKING from libvirt but it has some bogus stuff: > neither underscore capital, double underscore, or underscore 't' suffixes > are reserved in Posix/C: this appears to be based on misreading of the > C standard. Using sane prefixes is

[Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
We copied HACKING from libvirt but it has some bogus stuff: neither underscore capital, double underscore, or underscore 't' suffixes are reserved in Posix/C: this appears to be based on misreading of the C standard. Using sane prefixes is enough to avoid conflicts. These rules are also widely vio

Re: [Qemu-devel] [PATCH] HACKING: remove bogus restrictions

2012-08-28 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 07:01:16PM +0300, Michael S. Tsirkin wrote: > We copied HACKING from libvirt but it has some bogus stuff: > neither underscore capital, double underscore, or underscore 't' suffixes > are reserved in Posix/C: this appears to be based on misreading of the > C standard. Using