aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysrq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sysrq.h')
-rw-r--r--include/linux/sysrq.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 9df8833670cb..98a1d8cfb73d 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -37,23 +37,37 @@ struct sysrq_key_op {
37 37
38#ifdef CONFIG_MAGIC_SYSRQ 38#ifdef CONFIG_MAGIC_SYSRQ
39 39
40extern int sysrq_on(void);
41
42/*
43 * Do not use this one directly:
44 */
45extern int __sysrq_enabled;
46
40/* Generic SysRq interface -- you may call it from any device driver, supplying 47/* Generic SysRq interface -- you may call it from any device driver, supplying
41 * ASCII code of the key, pointer to registers and kbd/tty structs (if they 48 * ASCII code of the key, pointer to registers and kbd/tty structs (if they
42 * are available -- else NULL's). 49 * are available -- else NULL's).
43 */ 50 */
44 51
45void handle_sysrq(int, struct tty_struct *); 52void handle_sysrq(int key, struct tty_struct *tty);
46void __handle_sysrq(int, struct tty_struct *, int check_mask); 53void __handle_sysrq(int key, struct tty_struct *tty, int check_mask);
47int register_sysrq_key(int, struct sysrq_key_op *); 54int register_sysrq_key(int key, struct sysrq_key_op *op);
48int unregister_sysrq_key(int, struct sysrq_key_op *); 55int unregister_sysrq_key(int key, struct sysrq_key_op *op);
49struct sysrq_key_op *__sysrq_get_key_op(int key); 56struct sysrq_key_op *__sysrq_get_key_op(int key);
50 57
51#else 58#else
52 59
60static inline int sysrq_on(void)
61{
62 return 0;
63}
53static inline int __reterr(void) 64static inline int __reterr(void)
54{ 65{
55 return -EINVAL; 66 return -EINVAL;
56} 67}
68static inline void handle_sysrq(int key, struct tty_struct *tty)
69{
70}
57 71
58#define register_sysrq_key(ig,nore) __reterr() 72#define register_sysrq_key(ig,nore) __reterr()
59#define unregister_sysrq_key(ig,nore) __reterr() 73#define unregister_sysrq_key(ig,nore) __reterr()