[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
> -----Original Message----- > From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx] > Sent: 28 September 2012 18:56 > To: Paul Durrant > Cc: xen-devel@xxxxxxxxxxxxx > Subject: Re: [Xen-devel] [PATCH] Use new Xen public header for product > numbers and names > > Paul Durrant writes ("[Xen-devel] [PATCH] Use new Xen public header for > product numbers and names"): > > xen/include/public/hvm/pvdrivers.h has been added as the register of > > product numbers used by the blacklisting protocol. > > Use the definitions therein rather then locally coded values. > > This approach duplicates the list as is IMO not acceptable: > > > + case PVDRIVERS_XENSOURCE_WINDOWS_ID: > > + product = PVDRIVERS_XENSOURCE_WINDOWS_NAME; > > + break; > > + case PVDRIVERS_GPLPV_WINDOWS_ID: > > + product = PVDRIVERS_GPLPV_WINDOWS_NAME; > > + break; > > + case PVDRIVERS_LINUX_ID: > > + product = PVDRIVERS_LINUX_NAME; > > + break; > > + case PVDRIVERS_EXPERIMENTAL_ID: > > + product = PVDRIVERS_EXPERIMENTAL_NAME; > > + break; > > We need to avoid this formulaic code which needs changing every time a > new entry is added. > Ok. I'll come up with something we can use to define an array and then we can iterate over that. Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |