Skip to contentSkip to conversation

standard error codes

DISCUSSION Tobin C. Harding 2 participants 2 messages Mar 14, 2017

lore
Share & tools
lore
#0 lore raw

Driver code in staging/drivers/ks7010 uses the error code -E2BIG as the error returned if a string argument is larger than destination buffer. Would this not be better suited to the error code -EOVERFLOW? Does it matter?

For reference;

#define E2BIG 7 /* Argument list too long */
#define EOVERFLOW 75 /* Value too large for defined data type */

thanks,
Tobin.

#1 lore raw
Quoted 9 lines · Tobin C. Harding

Driver code in staging/drivers/ks7010 uses the error code -E2BIG as the error returned if a string argument is larger than destination buffer. Would this not be better suited to the error code -EOVERFLOW? Does it matter?

For reference;

#define E2BIG 7 /* Argument list too long */
#define EOVERFLOW 75 /* Value too large for defined data type */

It all depends on what happens to this error code. Is it sent to userspace? If so, what type of itnerface is it?

thanks,

greg k-h