[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH,RFC] More consistent error handling in libxl
On Wed, 2010-07-21 at 16:49 +0100, Ian Jackson wrote: > 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. Well in this case the default ERROR_FAIL is set. The thing here would either be to introduce ERROR_ERRNO in libxl for the case errno is expected to hold something valid or indeed to use errno instead of an xl specific error handling system. > > See the comment in xenctrl.h near line 70. > > I see Stefano has applied this already. I'm going to revert it. Well something needs to be done, in many of the patched cases, any errors were silently ignored. What would you suggest? Gianni _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |