Re: [PATCH]error codes for ioctl in hiddev
Jiri Kosina <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 23 Mar 2007, Oliver Neukum wrote:
> the correct error code for an unknown ioctl is ENOTTY.
(as already written in private mail conversation)
Hi Oliver,
are you sure about this? Looking at what POSIX states:
[EINVAL]
The request or arg argument is not valid for this device.
[ENOTTY]
The fildes argument is not associated with a STREAMS device that
accepts control functions.
So POSIX requires ioctl() to return ENOTTY when the object associated to
given descriptor does not accept ioctl()s at all. But in case of just cmd
or arg being unsupported for given device EINVAL should be OK.
--
Jiri Kosina
-------------------------------------------------------------------------
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