[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)
> > > IMHO, the best way to solve this is to define a set of XSPLICE_ERROR_* > > > that > > > covers the error codes returned by xsplice, and use that instead of XEN_* > > > errno values. This would make it much more easier to avoid mistakes when > > > coding the toolstack part of xsplice. > > > > But why? > > > > I must be missing something here - but the return from the hypercall > > can return say 0 but the status->rc can be -XEN_EAGAIN. > > > > Why does it need to be XSPLICE_ERROR_? > > Because nobody uses or enforces the correct usage of XEN_E* in the tools, so > people just use native error codes, which works on Linux, but breaks on > other OSes. That was an oversigh on my part. I think changing the error code handling in xen-xsplice to look for XEN_EXX is the right way. But are you saying the BSD does not enforce the POSIX errors? errno.h is POSIX right? > > Using something like XSPLICE_ERROR_* prevents people from having the bad > habit of directly using native OS error codes, by making it more obvious > that the error code is in a different space. > > Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |