Commit 0f3a9b1c authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[PATCH] Fix for magic sysrq when CONFIG_VT=n

The "unRaw" option for the magic sysrq key fails to compile if
CONFIG_VT is false.  This patch fixes that:
parent d7eb2712
...@@ -76,7 +76,7 @@ static struct sysrq_key_op sysrq_SAK_op = { ...@@ -76,7 +76,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
}; };
#endif #endif
#ifdef CONFIG_VT
/* unraw sysrq handler */ /* unraw sysrq handler */
static void sysrq_handle_unraw(int key, struct pt_regs *pt_regs, static void sysrq_handle_unraw(int key, struct pt_regs *pt_regs,
struct tty_struct *tty) struct tty_struct *tty)
...@@ -91,7 +91,7 @@ static struct sysrq_key_op sysrq_unraw_op = { ...@@ -91,7 +91,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
help_msg: "unRaw", help_msg: "unRaw",
action_msg: "Keyboard mode set to XLATE", action_msg: "Keyboard mode set to XLATE",
}; };
#endif /* CONFIG_VT */
/* reboot sysrq handler */ /* reboot sysrq handler */
static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs, static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
...@@ -371,7 +371,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { ...@@ -371,7 +371,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
as 'Off' at init time */ as 'Off' at init time */
/* p */ &sysrq_showregs_op, /* p */ &sysrq_showregs_op,
/* q */ NULL, /* q */ NULL,
#ifdef CONFIG_VT
/* r */ &sysrq_unraw_op, /* r */ &sysrq_unraw_op,
#else
/* r */ NULL,
#endif
/* s */ &sysrq_sync_op, /* s */ &sysrq_sync_op,
/* t */ &sysrq_showstate_op, /* t */ &sysrq_showstate_op,
/* u */ &sysrq_mountro_op, /* u */ &sysrq_mountro_op,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment