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

Re: [Xen-devel] [PATCH] Consistent handling of libxc errors in libxl (ta

To: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Consistent handling of libxc errors in libxl (take 2)
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 23 Jul 2010 17:26:44 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 23 Jul 2010 09:28:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1279818801.1723.2025.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>
Newsgroups: chiark.mail.xen.devel
References: <1279818801.1723.2025.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Gianni Tedesco writes ("[Xen-devel] [PATCH] Consistent handling of libxc errors 
in libxl (take 2)"):
> Removed mapping from libxc error codes to libxl - this is redundant because
> libxl ought to return -1 with errno set to a meaningful value. Now simply log
> the contents of errno before returning ERROR_FAIL if an xc call fails. Every
> caller in libxl should now be covered this way except for pci device removals
> and domain destroys where release of resources ought to continue even if an
> error occurs in an early step. In this case the error is still logged at least
Thanks for that patch.  It all looks great apart from this:

> diff -r b0b1a6163203 -r 8eaf5d79718f tools/libxl/libxl_dom.c
> --- a/tools/libxl/libxl_dom.c Thu Jul 22 15:24:49 2010 +0100
> +++ b/tools/libxl/libxl_dom.c Thu Jul 22 18:11:52 2010 +0100
> @@ -212,7 +212,7 @@ int build_pv(struct libxl_ctx *ctx, uint
>      ret = 0;
>  out:
>      xc_dom_release(dom);
> -    return libxl_xc_error(ret);
> +    return ERROR_FAIL;
>  }

This isn't correct because ret might be 0.  I've fixed it up and
applied it.

Thanks,
Ian.

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

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