From: Ian Campbell Subject: Re: [PATCH] libxl: add a dummy ao_how to libxl_domain_core_dump Date: Mon, 16 Apr 2012 16:56:47 +0100 Message-ID: <1334591807.14560.220.camel@zakaz.uk.xensource.com> References: <20364.16337.971144.457146@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20364.16337.971144.457146@mariner.uk.xensource.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: Ian Jackson Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Mon, 2012-04-16 at 16:50 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH] libxl: add a dummy ao_how to libxl_domain_core_dump"): > > libxl: add a dummy ao_how to libxl_domain_core_dump > > > > Although this function is not currently slow it may become so in the future > > (this also depends somewhat on the size of the guest). Therefore arrange for > > it to take an ao_how which it completes immediately. This will allow us to > > make it asynchronous in the future without breaking API compatibility. > ... > > ret = xc_domain_dumpcore(ctx->xch, domid, filename); > > if (ret<0) { > > LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "core dumping domain %d to %s", > > domid, filename); > > - return ERROR_FAIL; > > + rc = ERROR_FAIL; > > While you're doing that, did you want to change it to use "goto out" ? wouldn't the "out:" be immediately after this immediately following closing brace? > > } > > - return 0; > > + > > + libxl__ao_complete(egc, ao, rc); > > + > > + return AO_INPROGRESS; > > Ian.