patch-1.3.47 linux/drivers/char/tty_io.c
Next file: linux/drivers/char/vt.c
Previous file: linux/drivers/char/Makefile
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Tue Dec 12 07:16:36 1995
- Orig file:
v1.3.46/linux/drivers/char/tty_io.c
- Orig date:
Tue Nov 21 13:22:10 1995
diff -u --recursive --new-file v1.3.46/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -41,6 +41,9 @@
*
* New TIOCLINUX variants added.
* -- mj@k332.feld.cvut.cz, 19-Nov-95
+ *
+ * Restrict vt switching via ioctl()
+ * -- grif@cs.ucr.edu, 5-Dec-95
*/
#include <linux/config.h>
@@ -97,6 +100,7 @@
int kmsg_redirect = 0;
struct tty_struct * redirect = NULL;
struct wait_queue * keypress_wait = NULL;
+char vt_dont_switch = 0;
static void initialize_tty_struct(struct tty_struct *tty);
@@ -523,7 +527,7 @@
{
unsigned char old_vc_mode;
- if (new_console == fg_console)
+ if ((new_console == fg_console) || (vt_dont_switch))
return;
if (!vc_cons_allocated(new_console))
return;
@@ -594,7 +598,7 @@
*/
void change_console(unsigned int new_console)
{
- if (new_console == fg_console)
+ if ((new_console == fg_console) || (vt_dont_switch))
return;
if (!vc_cons_allocated(new_console))
return;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this