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

From: Jiri Slaby
Date: Thu Sep 27 2012 - 13:33:24 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/