From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Tue, 14 Mar 2017 14:15:43 +0800 Subject: standard error codes In-Reply-To: <20170314043338.GA5388@eros> References: <20170314043338.GA5388@eros> Message-ID: <20170314061543.GA336@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, Mar 14, 2017 at 03:33:38PM +1100, Tobin C. Harding wrote: > 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