patch-2.2.11 linux/drivers/char/keyboard.c

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

diff -u --recursive --new-file v2.2.10/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
@@ -32,6 +32,7 @@
 #include <linux/string.h>
 #include <linux/random.h>
 #include <linux/init.h>
+#include <linux/module.h>
 
 #include <asm/keyboard.h>
 #include <asm/bitops.h>
@@ -247,7 +248,7 @@
 		sysrq_pressed = !up_flag;
 		return;
 	} else if (sysrq_pressed) {
-		if (!up_flag)
+		if (!up_flag && sysrq_enabled)
 			handle_sysrq(kbd_sysrq_xlate[keycode], kbd_pt_regs, kbd, tty);
 		return;
 	}
@@ -321,15 +322,31 @@
 	}
 }
 
+#ifdef CONFIG_FORWARD_KEYBOARD
+extern int forward_chars;
 
 void put_queue(int ch)
 {
+	if (forward_chars == fg_console+1){
+		kbd_forward_char (ch);
+	} else {
+		wake_up(&keypress_wait);
+		if (tty) {
+			tty_insert_flip_char(tty, ch, 0);
+			con_schedule_flip(tty);
+		}
+	}
+}
+#else
+void put_queue(int ch)
+{
 	wake_up(&keypress_wait);
 	if (tty) {
 		tty_insert_flip_char(tty, ch, 0);
 		con_schedule_flip(tty);
 	}
 }
+#endif
 
 static void puts_queue(char *cp)
 {

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