[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xl: Fix CHK_ERRNO
Andrew Cooper writes ("Re: [PATCH] xl: Fix CHK_ERRNO"): > On 10/12/13 15:13, Ian Jackson wrote: > > You propose: > > > > #define CHK_POSERRNO( call ) ({ \ > > int chk_errno = (call); \ > > if (chk_errno > 0) { \ > > fprintf(stderr,"xl: fatal error: %s:%d: %s: %s\n", \ > > __FILE__,__LINE__, strerror(chk_errno), #call); \ > > exit(-ERROR_FAIL); \ > > } \ > > }) ... > In v2 of the patch, CHK_POSERRNO was renamed to CHK_LIBXLERR, but I can > certainly extend it to abort() if negative. But this has no connection to libxl error values. The error codes checked for here are actually errno values. So why are you proposing to call it CHK_LIBXLERR ? CHK_LIBXLERR would be for something that returned a libxl error value on error (and a nonnegative integer, perhaps 0, on success). I think Ian Campbell may have been misled by the calls to libxl_read_exactly. These functions do not return libxl error codes, but errno values, and this is stated in their doc comment. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |