patch-2.1.93 linux/drivers/char/tty_io.c

Next file: linux/drivers/misc/parport_pc.c
Previous file: linux/drivers/char/tga.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.92/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -66,6 +66,7 @@
 #include <linux/interrupt.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
+#include <linux/devpts_fs.h>
 #include <linux/file.h>
 #include <linux/console.h>
 #include <linux/timer.h>
@@ -1209,7 +1210,7 @@
 	if (device == PTMX_DEV) {
 		/* find a free pty. */
 		struct tty_driver *driver = tty_drivers;
-		int minor;
+		int minor, line;
 
 		/* find the pty driver */
 		for (driver=tty_drivers; driver; driver=driver->next)
@@ -1229,6 +1230,8 @@
 			return -EIO; /* no free ptys */
 		
 		set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
+		line = minor - driver->minor_start;
+		devpts_pty_new(line, MKDEV(driver->other->major, line+driver->other->minor_start));
 		noctty = 1;
 		goto init_dev_done;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov