From: Ian Jackson Subject: Re: [PATCH] Use new Xen public header for product numbers and names Date: Fri, 28 Sep 2012 18:55:58 +0100 Message-ID: <20581.58542.402088.878499@mariner.uk.xensource.com> References: <1348667684-29202-1-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: <1348667684-29202-1-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] 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. Ian.