Re: [patch 1/2] tty: pty - Move TIOCPKT handling into pty.c

Jiri Slaby
2012-09-27T17:33:33Z

On 09/27/2012 06:59 PM, Cyrill Gorcunov wrote:
> --- tty.git.orig/drivers/tty/pty.c
> +++ tty.git/drivers/tty/pty.c
> @@ -174,6 +174,31 @@ static int pty_set_lock(struct tty_struc
> return 0;
> }
>
> +/* Set the packet mode on a pty */
> +static int pty_set_pktmode(struct tty_struct *tty, int __user *arg)
> +{
> + unsigned long flags;
> + int pktmode;
> +
> + if (tty->driver->subtype != PTY_TYPE_MASTER)
> + return -ENOTTY;

Hi!

This check is not needed as the ioctls are master-only.

--
js
suse labs