patch-2.2.0-pre6 linux/drivers/char/console.c

Next file: linux/drivers/char/keyboard.c
Previous file: linux/drivers/char/README.epca
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre5/linux/drivers/char/console.c linux/drivers/char/console.c
@@ -2231,6 +2231,12 @@
 	return 0;
 }
 
+static void con_close(struct tty_struct *tty, struct file * filp)
+{
+	if (tty->count == 1)
+		tty->driver_data = 0;
+}
+
 static void vc_init(unsigned int currcons, unsigned int rows, unsigned int cols, int do_clear)
 {
 	int j, k ;
@@ -2292,6 +2298,7 @@
 	console_driver.termios_locked = console_termios_locked;
 
 	console_driver.open = con_open;
+	console_driver.close = con_close;
 	console_driver.write = con_write;
 	console_driver.write_room = con_write_room;
 	console_driver.put_char = con_put_char;

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