]> git.baikalelectronics.ru Git - kernel.git/commit
pty: reconnect the BSD TIOCSPTLCK handling to legacy ptys
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Sep 2009 14:49:40 +0000 (07:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Sep 2009 14:49:40 +0000 (07:49 -0700)
commite2467de3659a3406d36730c95422271a8ecc2cb5
treebe6ef41a9c2b595a79e088c976932314facceb9f
parenta6db45d12f429af8b501a04ad39bf01e412f8d08
pty: reconnect the BSD TIOCSPTLCK handling to legacy ptys

David Howells noticed (due to the compiler warning about an unused
'pty_ops_bsd' variable) that we haven't actually been using the code
that implements TIOCSPTLCK for legacy pty handling.  It's been that way
since 2.6.26, commit 9df8f523ef550876827aa1842a4299dd73cdea69 to be
exact ("pty: prepare for tty->ops changes").

DavidH initially submitted a patch just removing the dead code entirely,
and since nobody has apparently ever complained, I'm not entirely sure
that wouldn't be the right thing to do.  But since the whole and only
point of the legacy pty code is to be compatible with legacy distros
that don't use the new unix98 pty model, let's just wire it up again.

And clean it up a bit while we're at it.

Acked-by: David Howells <dhowells@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/pty.c