From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: Re: [PATCH 05/11] libxl: Provide libxl_domain_rename Date: Fri, 26 Mar 2010 10:01:12 +0000 Message-ID: <4BAC85E8.3030106@eu.citrix.com> References: <1269543854-7780-1-git-send-email-ian.jackson@eu.citrix.com> <1269543854-7780-6-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1269543854-7780-6-git-send-email-ian.jackson@eu.citrix.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: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 25/03/10 19:04, Ian Jackson wrote: > Provide a new function libxl_domain_rename. It can check that the > domain being renamed has the expected name, to avoid races. > > Use the new function to set the name during domain creation. this looks really ugly (transaction in transaction in domain make), and has a really complicated code path (which doesn't look right either on the first read), but my main objection is that libxl has no business handling the uniqueness of names or whatever you want to do here. libxl get a name string from whoever is using it (xl in your case), so if you want somehow to have a special feature make it so in xl. in other words, no policies in libxl. also NULL is for pointer, 0 for integer values. -- Vincent