diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-09-11 19:47:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-09-14 11:12:17 -0400 |
commit | e21120383f2dce32312f63ffca145ff8a87d41f5 (patch) | |
tree | 661d5407abe26f4623ad180f7ee33aa4fb17a087 /drivers/tty/tty_ioctl.c | |
parent | 77021f8bab02d8099c7ae4360aa6746b3b733ba7 (diff) | |
download | op-kernel-dev-e21120383f2dce32312f63ffca145ff8a87d41f5.zip op-kernel-dev-e21120383f2dce32312f63ffca145ff8a87d41f5.tar.gz |
move compat handling of tty ioctls to tty_compat_ioctl()
ioctls that are
* callable only via tty_ioctl()
* not driver-specific
* not demand data structure conversions
* either always need passing arg as is or always demand compat_ptr()
get intercepted in tty_compat_ioctl() from the very beginning and
redirecter to tty_ioctl(). As the result, their entries in fs/compat_ioctl.c
(some of those had been missing, BTW) got removed, as well as
n_tty_compat_ioctl_helper() (now it's never called with any cmd it would accept).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/tty/tty_ioctl.c')
-rw-r--r-- | drivers/tty/tty_ioctl.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index d99fec4..9245fff 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c @@ -941,19 +941,3 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, } } EXPORT_SYMBOL(n_tty_ioctl_helper); - -#ifdef CONFIG_COMPAT -long n_tty_compat_ioctl_helper(struct tty_struct *tty, struct file *file, - unsigned int cmd, unsigned long arg) -{ - switch (cmd) { - case TIOCGLCKTRMIOS: - case TIOCSLCKTRMIOS: - return tty_mode_ioctl(tty, file, cmd, (unsigned long) compat_ptr(arg)); - default: - return -ENOIOCTLCMD; - } -} -EXPORT_SYMBOL(n_tty_compat_ioctl_helper); -#endif - |