From: Ian Jackson Subject: Re: [PATCH] xl: make libxl_uuid2string internal to libxenlight Date: Fri, 13 Aug 2010 15:55:53 +0100 Message-ID: <19557.23801.139129.38585@mariner.uk.xensource.com> References: <1281710000.18490.325.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1281710000.18490.325.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Gianni Tedesco (3P)" Cc: Ian Campbell , Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Gianni Tedesco (3P) writes ("[PATCH] xl: make libxl_uuid2string internal to libxenlight"): > libxenlight exports a function libxl_uuid2string which is used > internally in several places but has one external caller in xl. The > function mainly implements policy so should not be part of the > libxenlight API. The extent to which it can be considered mechanism it > is not a xen mechanism since UUID's are not a concept exlusive to xen. > > The one caller in xl seems to be an "odd-one-out" since xl has its own > UUID formatting macros in any case. This is not a good idea because it duplicates code - even if it's just the macros for formatting uuids. How to format a UUID is not "policy", it is a fact about UUIDs. I see that xl already has some duplicated uuid formatting code. This should be removed, not extended. One of the cardinal sins in programming is duplicating code. Nacked-by: Ian Jackson Ian.