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

Re: [Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers.


  • To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Mon, 1 Oct 2012 17:17:51 +0100
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 01 Oct 2012 16:18:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac2f5yurfAGbDhUlR4Kk6vvaxrZeUQAB+yPw
  • Thread-topic: [Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers.

> -----Original Message-----
> From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx]
> Sent: 01 October 2012 16:12
> To: Paul Durrant
> Cc: xen-devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve
> as the register of product numbers.
> 
> Paul Durrant writes ("[Xen-devel] [PATCH 1/2] Add a new pvdrivers header
> to serve as the register of product numbers."):
> 
> > +#define PVDRIVERS_PRODUCT_LIST(EACH)                         \
> > +        EACH("xensource-windows", 0x0001) /* Citrix */       \
> > +        EACH("gplpv-windows",     0x0002) /* James Harper */ \
> > +        EACH("experimental",      0xffff)                    \
> > +        EACH(NULL,                0x0000) /* terminator */
> 
> When you said a terminator, I thought you meant macro parameters to
> PVDRIVERS_PRODUCT_LIST which were invoked only between elements.
> 
> This invocation of EACH is harmful.  If the user wants to make an array out of
> this, they can add it themselves.  But if they want to make a switch
> statement out of it, they can't.
> 

Ok. I thought it was helpful to reserve product number 0 for this purpose, but 
I'll ditch it.

  Paul

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.