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,RFC] More consistent error handling in libxl

To: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH,RFC] More consistent error handling in libxl
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 21 Jul 2010 16:49:11 +0100
Cc:
Delivery-date: Wed, 21 Jul 2010 08:50:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19527.5845.961826.356384@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <1279554263.1723.1889.camel@xxxxxxxxxxxxxxxxxxxxxx> <19527.5845.961826.356384@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I wrote:
> Gianni Tedesco writes ("[Xen-devel] [PATCH,RFC] More consistent error 
> handling in libxl"):
> > +    int rc;
> > +    rc = xc_domain_pause(ctx->xch, domid);
> > +    return libxl_xc_error(rc);
> 
> I'm afraid this pattern is wrong for two reasons.  Firstly,
> xc_domain_pause and functions like it do not return XC_ERROR_* values.
> They typically return -1 on error, and set errno.
> 
> Secondly, the error codes from libxc are not really all that useful.
> They mostly serve to identify where the error originated.
> 
> See the comment in xenctrl.h near line 70.

I see Stefano has applied this already.  I'm going to revert it.

Ian.

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