[PATCH]error codes for ioctl in hiddev
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Novell |
| Message-ID | <[email protected]> |
Hi, the correct error code for an unknown ioctl is ENOTTY. Regards Oliver Signed-off-by: Oliver Neukum <[email protected]> -- --- a/drivers/usb/input/hiddev.c 2007-03-23 16:36:28.000000000 +0100 +++ b/drivers/usb/input/hiddev.c 2007-03-23 16:36:32.000000000 +0100 @@ -698,7 +698,7 @@ default: if (_IOC_TYPE(cmd) != 'H' || _IOC_DIR(cmd) != _IOC_READ) - return -EINVAL; + return -ENOTTY; if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGNAME(0))) { int len; @@ -722,7 +722,7 @@ -EFAULT : len; } } - return -EINVAL; + return -ENOTTY; } static const struct file_operations hiddev_fops = { ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel