Re: [PATCH] Applying inappropriate ioctl operation on socket shouldreturn ENOTTY
From: Alan Cox
Date: Wed Apr 27 2011 - 07:50:58 EST
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/