|
[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 19:57, Ian Jackson wrote:
Nope, we don't return rc directly. In any case of error, rc is reset as "ERROR_FAIL" finally. 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. Sorry I can't understand completely what you want to do. But I really agree we should improve this chunk of codes, what about this?
if (errno != ENOBUFS) {
rc = ERROR_FAIL;
goto out;
}
*xrdm = libxl__malloc(gc,
*nr_entries *
sizeof(xen_reserved_device_memory_t));
rc = xc_reserved_device_memory_map(CTX->xch, flag, seg, bus, devfn,
*xrdm, nr_entries);
if (rc)
rc = ERROR_FAIL;
out:
if (rc) {
*nr_entries = 0;
*xrdm = NULL;
LOG(ERROR, "Could not get reserved device memory maps.\n");
}
return rc;
I think this make more readable and clear.
... Fixed. Thanks Tiejun _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |