Andre Guedes <andre.guedes@...>
Quoting Jesus Sanchez-Palencia (2016-03-02 16:03:22)
Yes, this is the idea.The initial discussion was about using errno.h codes at the driver's layer+1 ! But I would propose that we first get this right for the device driver APIs.
DEV_OK = 0Back then, I reviewed the error codes usages and this was what I had in mind:
DEV_OK = 0
DEV_FAIL = -EIO /* Input/output error */
DEV_INVALID_OP = -EINVAL /* Invalid argument */
DEV_INVALID_CONF = -EINVAL /* Invalid argument */
DEV_USED = -EBUSY /* Device or resource busy */
DEV_NO_ACCESS = -EACCES /* Permission denied */
DEV_NO_SUPPORT = -ENOTSUP /* Operation not supported */
DEV_NOT_CONFIG = -EPERM /* Operation not permitted */
DEV_NOT_IMPLEMENTED -ENOSYS /* Function not implemented */
The comments besides the error codes come from 'man errno'.