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

Next file: linux/drivers/char/tuner.c
Previous file: linux/drivers/char/tda985x.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.49/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -1321,7 +1321,7 @@
 		set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
 		minor -= driver->minor_start;
 		devpts_pty_new(driver->other->name_base + minor, MKDEV(driver->other->major, minor + driver->other->minor_start));
-		tty_register_devfs(&pts_driver[major], 0,
+		tty_register_devfs(&pts_driver[major], DEVFS_FL_NO_PERSISTENCE,
 				   pts_driver[major].minor_start + minor);
 		noctty = 1;
 		goto init_dev_done;
@@ -2003,7 +2003,6 @@
 	struct tty_struct tty;
 	char buf[32];
 
-	flags |= DEVFS_FL_DEFAULT;
 	tty.driver = *driver;
 	tty.device = MKDEV (driver->major, minor);
 	switch (tty.device) {
@@ -2012,28 +2011,22 @@
 			mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
 			break;
 		default:
-			flags |= DEVFS_FL_AUTO_OWNER;
 			break;
 	}
-	if ((minor <  driver->minor_start) || 
-	    (minor >= driver->minor_start + driver->num)) {
+	if ( (minor <  driver->minor_start) || 
+	     (minor >= driver->minor_start + driver->num) ) {
 		printk(KERN_ERR "Attempt to register invalid minor number "
 		       "with devfs (%d:%d).\n", (int)driver->major,(int)minor);
 		return;
 	}
-	if (driver->type == TTY_DRIVER_TYPE_CONSOLE) {
-		flags |= DEVFS_FL_AOPEN_NOTIFY;
-		flags &= ~DEVFS_FL_AUTO_OWNER;
-	}
 #  ifdef CONFIG_UNIX98_PTYS
 	if ( (driver->major >= UNIX98_PTY_SLAVE_MAJOR) &&
 	     (driver->major < UNIX98_PTY_SLAVE_MAJOR + UNIX98_NR_MAJORS) ) {
-		flags &= ~DEVFS_FL_AUTO_OWNER;
 		uid = current->uid;
 		gid = current->gid;
 	}
 #  endif
-	devfs_register (NULL, tty_name (&tty, buf), 0, flags,
+	devfs_register (NULL, tty_name (&tty, buf), 0,flags | DEVFS_FL_DEFAULT,
 			driver->major, minor, mode, uid, gid,
 			&tty_fops, NULL);
 #endif /* CONFIG_DEVFS_FS */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)