diff options
Diffstat (limited to 'include/linux/sysrq.h')
-rw-r--r-- | include/linux/sysrq.h | 22 |
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 | ||
40 | extern int sysrq_on(void); | ||
41 | |||
42 | /* | ||
43 | * Do not use this one directly: | ||
44 | */ | ||
45 | extern 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 | ||
45 | void handle_sysrq(int, struct tty_struct *); | 52 | void handle_sysrq(int key, struct tty_struct *tty); |
46 | void __handle_sysrq(int, struct tty_struct *, int check_mask); | 53 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); |
47 | int register_sysrq_key(int, struct sysrq_key_op *); | 54 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
48 | int unregister_sysrq_key(int, struct sysrq_key_op *); | 55 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
49 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 56 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
50 | 57 | ||
51 | #else | 58 | #else |
52 | 59 | ||
60 | static inline int sysrq_on(void) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
53 | static inline int __reterr(void) | 64 | static inline int __reterr(void) |
54 | { | 65 | { |
55 | return -EINVAL; | 66 | return -EINVAL; |
56 | } | 67 | } |
68 | static 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() |