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

Re: [Xen-devel] [v5][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM



On 2015/7/7 22:57, Ian Jackson wrote:
Chen, Tiejun writes ("Re: [v5][PATCH 11/16] tools/libxl: detect and avoid conflicts 
with RDM"):
On 2015/7/7 19:57, Ian Jackson wrote:
I think the error handling here is wrong.  Certainly `rc' should not
be used for a libxc return.

Nope, we don't return rc directly. In any case of error, rc is reset as
"ERROR_FAIL" finally.

Did you see

See tools/libxl/CODING_STYLE.  I know that much of the existing code
uses rc for libxc returns but this is deprecated, and please don't
make more of it.

this ?


Are you saying this? We should use 'r' as the return value of libxc call

    int rc = 0, r;

    r = xc_reserved_device_memory_map(CTX->xch, flag, seg, bus, devfn,
                                      NULL, nr_entries);
    assert(r <= 0);
    /* "0" means we have no any rdm entry. */
    if (!r) goto out;

Thanks
Tiejun

_______________________________________________
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®.