[openib-general] Different low level drivers returns different return values incase of an error

Bryan O'Sullivan bos at pathscale.com
Mon Dec 18 07:22:17 PST 2006


Hoang-Nam Nguyen wrote:

> Good point. I can speak for ehca only. We prefer to reuse existing
> errno values and not to define new ones as it's also a question of
> how much information we want to tell the consumer in case of error
> and what it can handle for.

This is independent of the question of whether to return -1 or -errno to 
indicate an error in userspace.  The standard in userspace has long been 
to return -1, with the error code propagated through the errno 
pseudo-variable.  It's a crummy convention, but it's at least consistent 
with the rest of userspace.

(By the way, libipathverbs just propagates error codes up from 
libibverbs.  It doesn't generate any new numeric return values of its own.)

	<b




More information about the general mailing list