tty: move tioclinux from a special case
Right now we have ifdefs and hooks in the core ioctl handler for TIOCLINUX and then test if its a console. This is brain dead. Instead call the tioclinux helper from the relevant driver ioctl methods. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -2583,8 +2583,6 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
|
||||
int lines;
|
||||
int ret;
|
||||
|
||||
if (tty->driver->type != TTY_DRIVER_TYPE_CONSOLE)
|
||||
return -EINVAL;
|
||||
if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
if (get_user(type, p))
|
||||
|
Reference in New Issue
Block a user