[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 1/9] libxl idl: add comments to error enum
Ian Campbell writes ("Re: [Xen-devel] [PATCH RFC 1/9] libxl idl: add comments to error enum"): > It would be a bit wrong to have an application specific error code in > the library space. Yes. > Perhaps we should declare some ranges which for specific uses. For > instance perhaps 0x7FFF0000..0x7FFFFFFF could be set aside for the > application, so xl can define itself some errors which it can use for > its own needs without needing to handle two separate error spaces. xl > could then define these codes itself. All libxl errors are negative and no libxl function returns (either (a nonnegative success value) or (a negative error code)). If we were just to promise that then the application has a wide space of numbers. > Likewise perhaps libxl internal errors should be given their own range, > which the application can legitimately expect never to see. This is unwise; they might escape... > I was originally think about this in the context of the xenstore patch > in this series, i.e. declaring that some range is used for the existing > XS error codes (e.g. 0x3000xxxx is a xenstore code). I'm not sure if > that's a good idea or not. I have no objection to mapping existing error code spaces into libxl ones. But we need to do this with a bit of care. I think passing xenstore or hypervisor errno numbers directly to the caller will often be a bad idea. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |