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

Re: [Xen-devel] [PATCH] Use new Xen public header for product numbers and names [and 1 more messages]



Paul Durrant writes ("RE: [Xen-devel] [PATCH] Use new Xen public header for 
product numbers     and names"):
> I liked it so that's what I did :-) I added a terminator entry for
> convenience when defining an array. Not needed when defining a
> switch statement but harmless since it's a case that should never be
> hit.

Very well.

Keir Fraser writes ("Re: [Xen-devel] [PATCH] Use new Xen public header for 
product numbers and names"):
> My usual way to do this would be to place the list in its own header file:
> 
> pvdrivers_list.h:
> EACH(WINDOWS, 0x0001, "xensource-windows")
> EACH(...)
> ...
> 
> Then e.g.,
> #define EACH(name,num,string) PVDRIVERS_ID_##name = num,
> enum {
> #include "pvdrivers_list.h"
> }
> #undef EACH
> 
> Which is a bit more abstruse on the consuming side, but does avoid the list
> itself being an ugly multi-line macro monster.

This is fine by me too.

Thanks,
Ian.

_______________________________________________
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®.