[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 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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.