Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30179
b: refs/heads/master
c: d2be8ee
h: refs/heads/master
i:
  30177: e58af5f
  30175: 21c38ba
v: v3
  • Loading branch information
Fredrik Roubert authored and Linus Torvalds committed Jun 26, 2006
1 parent b49c8d1 commit e020ff9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c6856f702732d3cfc33eb59303e998ad6961de8
refs/heads/master: d2be8ee53856c3c510d4d38f534979747db65d96
10 changes: 8 additions & 2 deletions trunk/drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ unsigned char kbd_sysrq_xlate[KEY_MAX + 1] =
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
"\r\000/"; /* 0x60 - 0x6f */
static int sysrq_down;
static int sysrq_alt_use;
#endif
static int sysrq_alt;

Expand Down Expand Up @@ -1143,7 +1144,7 @@ static void kbd_keycode(unsigned int keycode, int down,
kbd = kbd_table + fg_console;

if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT)
sysrq_alt = down;
sysrq_alt = down ? keycode : 0;
#ifdef CONFIG_SPARC
if (keycode == KEY_STOP)
sparc_l1_a_state = down;
Expand All @@ -1163,9 +1164,14 @@ static void kbd_keycode(unsigned int keycode, int down,

#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
sysrq_down = down;
if (!sysrq_down) {
sysrq_down = down;
sysrq_alt_use = sysrq_alt;
}
return;
}
if (sysrq_down && !down && keycode == sysrq_alt_use)
sysrq_down = 0;
if (sysrq_down && down && !rep) {
handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);
return;
Expand Down

0 comments on commit e020ff9

Please sign in to comment.