WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xl: make libxl_uuid2string internal to libxenlig

To: "Gianni Tedesco (3P)" <gianni.tedesco@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xl: make libxl_uuid2string internal to libxenlight
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 15:55:53 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 13 Aug 2010 07:56:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1281710000.18490.325.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1281710000.18490.325.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.jackson@xxxxxxxxxxxxx>

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>