Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Ingo Molnar <mingo <at> elte.hu>
Subject: Re: [RFC] Remove or convert empty ioctls ?
Newsgroups: gmane.linux.kernel
Date: Thursday 15th October 2009 15:50:23 UTC (over 7 years ago)
* Jeff Garzik <[email protected]> wrote:

> On 10/15/2009 11:31 AM, Alan Cox wrote:
>> EINVAL means you used an ioctl that is correct for the driver but that
>> for some reason the driver didn't like it.
>
> Precisely.
>
> The driver author proactively chose to implement the ioctl and return 
> a value other than ENOTTY.
>
> It is invalid to assume that all such cases are a direct result of 
> author mistakes or ignorance.

If 10% of the cases the error return was for a reason it's still worth 
doing this. If it matters we'll hear about it.

Something that looks like crap should not get extra protection to stay 
in the kernel just because it 'might' be non-crap. If it's not clearly 
documented in the source to be -EINVAL for a good reason (and frankly i 
cannot think of any) then i'd suggest to do what Alan has been doing for 
years: just change it and see if it causes any problems.

It's not like it's hard to revert such a change. (and we'll also add a 
comment explaining the reason for the -EINVAL in that case.)

	Ingo
 
CD: 2ms