5 Jun
2015
5 Jun
'15
8:50 a.m.
Adam Goode wrote:
/**
- \brief Get the card number of a client_info container
- \param info client_info container
- \return the card number, -1 if no card associated with this client, or -ENOSYS if the
kernel does not support reporting this field
- */
-1 is used as an out-of-range value when enumerating cards. However, I don't think this convention can be applied here, because the return value is also used for error codes, and -1 would correspond to -EPERM.
Squashing all error codes into -1 is not a good idea, so I think the value -1 should be converted into an appropriate error code, probably -ENXIO.
Regards, Clemens