lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Remove or convert empty ioctls ?
On 10/15/2009 05:20 AM, Thomas Gleixner wrote:
> Hi,
>
> while looking into pushing down BKL to ioctls I noticed that we have a
> lot of ioctls which simply return -EINVAL or some other fancy error
> code.
>
> The question is whether we should convert them to unlocked_ioctl or
> simply remove them and let the sys_ioctl code return the default
> -ENOTTY error code.
>
> One could argue that this is a user visible change, but OTOH there is
> no particular value of EINVAL or any other weird error code when it
> just says: there is no ioctl for this fd.

It seems like a mistake to generalize a rule out of this, especially if
it leads to error return values changing unexpectedly in years-old code.

"no particular value" is highly subjective, and I think unprovable,
without an exhaustive survey of userland programs interacting with
kernel drivers. Userland programs often interact with a -class- of
drivers, expecting predictable behavior from a DoThisThing ioctl, with
EINVAL or "other weird error code" returned intentionally.

Changing the return codes seems quite unwise.

Jeff






\
 
 \ /
  Last update: 2009-10-15 14:19    [W:1.450 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site