Andre Guedes <andre.guedes@...>
Quoting Kalowsky, Daniel (2016-02-17 05:09:07)
I think ENOSYS would perfectly match what we want here since it meansGood point. You're alternate point (in another post) of ENOSYS not matching is also valid.DEV_NO_SUPPORT seems to cover the concept. Not sure we need aDEV_NOT_IMPLEMENTED. Or as Peter points out ENOSYS works as well.
"Function not implemented" (as Peter pointed in the other reply).
Speaking of which, I was talking to Dirk in the other day and we both agreed
that it would be a good idea we use errno.h codes instead of DEV_* at the
driver's layer. The main points are 1) errno.h is a well-known error convention
which pretty much all developer is familiar with, 2) errno.h codes address what
we need, 3) no need to create new codes such as DEV_NOT_IMPLEMENTED for instance,
and 4) changing the current drivers to use errno.h codes instead of DEV_* is a
What do you think?
I think you've convinced me. The challenge now is to make sure it's used appropriately. As we've shown, we'll need to be explicit with why some functions actually need to return DEV_OK or whatever vs DEV_NO_SUPPORT.Yes, this is the challenge. I volunteer to review and fix what we have
upstream. However, we have to pay attention for this kind of things
while reviewing new patches on Gerrit to ensure they are merged with
the proper return codes.