qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] xen: fix usage of ENODATA


From: Roger Pau Monné
Subject: Re: [Qemu-devel] [PATCH 1/2] xen: fix usage of ENODATA
Date: Tue, 15 Apr 2014 18:28:20 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]