Re: ioctl cleanups: enable sg_io and serial stuff to be shared

David S. Miller
2003-05-07T15:52:24Z

On Wed, 2003-05-07 at 08:28, Pavel Machek wrote:
> Not sure if we are not too close to stable release to do that? And I
> see no incremental way how to get there. Moving compatibility stuff
> closer to drivers can be done close to stable release...

You can define it as follows:

1) If entry exists in COMPAT or TRANSLATE table, invoke
fops->ioctl(), else

2) If ->compat_ioctl() exists, invoke that, else

3) Fail.

The COMPAT tables are sort of valuable, in that it eliminates
the need to duplicate code when all of a drivers ioctls need
no translation.

BTW, need to extend this to netdev->do_ioctl as well for the
handling of SIOCDEVPRIVATE based stuff. Oh goody, we can finally
fix up that crap :))))

--
David S. Miller <davem@redhat.com>