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

Next file: linux/drivers/fc4/Config.in
Previous file: linux/drivers/char/serial.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.129/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -1269,8 +1269,10 @@
 		filp->f_flags |= O_NONBLOCK; /* Don't let /dev/console block */
 		noctty = 1;
 	}
-#ifdef CONFIG_UNIX98_PTYS
+
 	if (device == PTMX_DEV) {
+#ifdef CONFIG_UNIX98_PTYS
+
 		/* find a free pty. */
 		int major, minor;
 		struct tty_driver *driver;
@@ -1293,9 +1295,14 @@
 		devpts_pty_new(driver->other->name_base + minor, MKDEV(driver->other->major, minor + driver->other->minor_start));
 		noctty = 1;
 		goto init_dev_done;
+
+#else   /* CONFIG_UNIX_98_PTYS */
+
+		return -ENODEV;
+
+#endif  /* CONFIG_UNIX_98_PTYS */
 	}
-#endif
-	
+
 	retval = init_dev(device, &tty);
 	if (retval)
 		return retval;

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