From: Ian Jackson Subject: Re: [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers. Date: Fri, 28 Sep 2012 18:54:49 +0100 Message-ID: <20581.58473.910119.605510@mariner.uk.xensource.com> References: <1348667438-28496-1-git-send-email-paul.durrant@citrix.com> <1348667438-28496-2-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1348667438-28496-2-git-send-email-paul.durrant@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Paul Durrant writes ("[Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers."): > These product numbers are used by the QEMU blacklisting protocol in > traditional QEMU and are currently coded directly into the xenstore.c > source module. Since there are now multiple QEMUs this information > should be pulled into a public header to avoid duplication/conflict. > hvm-emulated-unplug.markdown has also been adjusted to reference the > new header. > +#define PVDRIVERS_XENSOURCE_WINDOWS_ID 0x0001 /* Citrix */ > +#define PVDRIVERS_XENSOURCE_WINDOWS_NAME "xensource-windows" > + > +#define PVDRIVERS_GPLPV_WINDOWS_ID 0x0002 /* James Harper */ > +#define PVDRIVERS_GPLPV_WINDOWS_NAME "gplpv-windows" > + > +#define PVDRIVERS_EXPERIMENTAL_ID 0xffff > +#define PVDRIVERS_EXPERIMENTAL_NAME "experimental" This form for this list is very ill-suited to many obvious uses. For example it cannot be used to automatically generate a switch statement or a table of values for printing. Can I suggest #define PVDRIVERS_ID_NAME_LIST(EACH) \ EACH(WINDOWS, 0x0001 /* Citrix */, "xensource-windows") \ ... or something ? Ian.