Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279080

[PATCH 08/12] pty: Prepare to redefine tty driver remove() interface

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject [PATCH 08/12] pty: Prepare to redefine tty driver remove() interface
Date 2015-11-28 03:30 +0100
Message-ID <qzDqW-2GJ-15@gated-at.bofh.it> (permalink)
References <qzDqV-2GJ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


BSD pty drivers are cross-linked at driver initialization and linked pairs
must have the same tty index; use this information to simplify clearing
the driver tables.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/pty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index be5020d..2680044 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -463,10 +463,8 @@ static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
 
 static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
 {
-	struct tty_struct *pair = tty->link;
 	driver->ttys[tty->index] = NULL;
-	if (pair)
-		pair->driver->ttys[pair->index] = NULL;
+	driver->other->ttys[tty->index] = NULL;
 }
 
 static int pty_bsd_ioctl(struct tty_struct *tty,
-- 
2.6.3

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 08/12] pty: Prepare to redefine tty driver remove() interface Peter Hurley <peter@hurleysoftware.com> - 2015-11-28 03:30 +0100

csiph-web