[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] xen: fix usage of ENODATA
On 15/04/14 17:28, Roger Pau Monné wrote: > On 15/04/14 18:15, Anthony PERARD wrote: >> On Tue, Apr 15, 2014 at 10:33:08AM +0200, Roger Pau Monne wrote: >>> ENODATA doesn't exist on FreeBSD, so ENODATA errors returned by the >>> hypervisor are translated to ENOENT. >>> >>> Also, the error code is returned in errno if the call returns -1, so >>> compare the error code with the value in errno instead of the value >>> returned by the function. >> But in xenctrl.h, the comment on the prototype of the function says that >> it return the error code, there is nothing about errno been updated. So >> I think rc should still be check for the error code instead of errno. > Then I think the comment is wrong (or I'm missing something), > xc_hvm_track_dirty_vram return code comes from do_xen_hypercall, which > is basically a wrapper around ioctl, and according to the ioctl man page > (both Linux and FreeBSD versions): > > "On error, -1 is returned, and errno is set appropriately." > > Roger. The only thing you can safely assume about libxc and error values is that there is no consistency whatsoever (and in some cases a completely inability to determine success or failure from the return value). This is acknowledged as needing to be fixed. The only way you have of actually working out the error semantics are to follow the function you care about all the way to the ioctl. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |