From: Ian Jackson Subject: Re: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown Date: Mon, 16 Nov 2015 17:20:22 +0000 Message-ID: <22090.4182.47345.718602@mariner.uk.xensource.com> References: <1447258719-21891-1-git-send-email-paul.durrant@citrix.com> <1447258719-21891-3-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyNSK-0005pl-R5 for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 17:20:40 +0000 In-Reply-To: <1447258719-21891-3-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.xenproject.org, Wei Liu , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Paul Durrant writes ("[RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown"): > As documented in docs/misc/xenstore, the XS_MKDIR operation merely makes > sure a path exists whereas ~/control/shutdown needs to start empty. Also > using XS_MKDIR for a node which is never supposed to have children is > somewhat counterintuitive. The way xenstore doesn't distinguish between leaves and directories is unusual but it is part of the xenstore API. I think users inside libxl will have to cope with it anyway. > This patch introduces a new libxl__xs_printf_perms() function analogous > to libxl__xs_printf() but taking explicit permissions arguments, and then > uses this to create an empty ~/control/shutdown node. This is a lot of extra boilerplate to clean up one slightly odd call. Maybe it would be easier to rename libxl__xs_mkdir to libxl__xs_mknode ? (It's probably too late to rename XS_MKDIR.) Ian.