From: Ian Jackson Subject: Re: [PATCH v5 7/8] xl/libxl: implement QDISK libxl_device_disk_local_attach Date: Fri, 4 May 2012 17:42:28 +0100 Message-ID: <20388.1780.828830.419864@mariner.uk.xensource.com> References: <1336130000-27261-7-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1336130000-27261-7-git-send-email-stefano.stabellini@eu.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: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("[PATCH v5 7/8] xl/libxl: implement QDISK libxl_device_disk_local_attach"): > - Spawn a QEMU instance at boot time to handle disk local attach > requests. ... > diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c > index 7a1e017..e180498 100644 > --- a/tools/libxl/libxl_internal.c > +++ b/tools/libxl/libxl_internal.c ... > + rc = xs_transaction_end(ctx->xsh, t, 0); > + } while (rc == 0 && errno == EAGAIN); > + t = XBT_NULL; > + if (rc == 0) { > + LOGE(ERROR, "xenstore transaction failed"); > + goto out; Maybe I'm being excessively picky, but I think "rc" should be used only for a variable which contains libxl error codes. I had to do a double-take when I saw if (rc == 0) { error handling; since rc==0 is of course the success case. Ian.