Messages in this thread | | | Date | Wed, 27 Apr 2011 12:52:01 +0100 | From | Alan Cox <> | Subject | Re: [PATCH] Applying inappropriate ioctl operation on socket should return ENOTTY |
| |
> Well, I wont argue the point, especially if you Ack the changes ;) > > My only concern was to not break old applications, I dont know if it is > going to break _any_ of them. Probably these old applications stick with > old kernels.
The number of applications that actually check ioctl error codes beyond if error perror; return is pretty small and those that do generally do so for very narrow cases or for things like EWOULDBLOCK/EINTR stuff.
> If you ask me ENOTTY is plain wrong. > ioctl() is not restricted to terminal devices at all.
Like the tab/space thing in Makefiles and Qwerty keyboards its now part of how stuff all works but EINVAL is even worse because you cannot tell between 'this ioctl isn't know/is used on the wrong fd' and 'argument wrong to valid ioctl'
Alan
| |