diff options
Diffstat (limited to 'include/linux/sysrq.h')
-rw-r--r-- | include/linux/sysrq.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 99adcdc0d3ca..387fa7d05c98 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -15,9 +15,7 @@ | |||
15 | #define _LINUX_SYSRQ_H | 15 | #define _LINUX_SYSRQ_H |
16 | 16 | ||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | 18 | #include <linux/types.h> | |
19 | struct pt_regs; | ||
20 | struct tty_struct; | ||
21 | 19 | ||
22 | /* Possible values of bitmask for enabling sysrq functions */ | 20 | /* Possible values of bitmask for enabling sysrq functions */ |
23 | /* 0x0001 is reserved for enable everything */ | 21 | /* 0x0001 is reserved for enable everything */ |
@@ -31,7 +29,7 @@ struct tty_struct; | |||
31 | #define SYSRQ_ENABLE_RTNICE 0x0100 | 29 | #define SYSRQ_ENABLE_RTNICE 0x0100 |
32 | 30 | ||
33 | struct sysrq_key_op { | 31 | struct sysrq_key_op { |
34 | void (*handler)(int, struct tty_struct *); | 32 | void (*handler)(int); |
35 | char *help_msg; | 33 | char *help_msg; |
36 | char *action_msg; | 34 | char *action_msg; |
37 | int enable_mask; | 35 | int enable_mask; |
@@ -39,41 +37,39 @@ struct sysrq_key_op { | |||
39 | 37 | ||
40 | #ifdef CONFIG_MAGIC_SYSRQ | 38 | #ifdef CONFIG_MAGIC_SYSRQ |
41 | 39 | ||
42 | extern int sysrq_on(void); | ||
43 | |||
44 | /* | ||
45 | * Do not use this one directly: | ||
46 | */ | ||
47 | extern int __sysrq_enabled; | ||
48 | |||
49 | /* Generic SysRq interface -- you may call it from any device driver, supplying | 40 | /* Generic SysRq interface -- you may call it from any device driver, supplying |
50 | * ASCII code of the key, pointer to registers and kbd/tty structs (if they | 41 | * ASCII code of the key, pointer to registers and kbd/tty structs (if they |
51 | * are available -- else NULL's). | 42 | * are available -- else NULL's). |
52 | */ | 43 | */ |
53 | 44 | ||
54 | void handle_sysrq(int key, struct tty_struct *tty); | 45 | void handle_sysrq(int key); |
55 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | 46 | void __handle_sysrq(int key, bool check_mask); |
56 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 47 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
57 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 48 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
58 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 49 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
59 | 50 | ||
51 | int sysrq_toggle_support(int enable_mask); | ||
52 | |||
60 | #else | 53 | #else |
61 | 54 | ||
62 | static inline int sysrq_on(void) | 55 | static inline void handle_sysrq(int key) |
56 | { | ||
57 | } | ||
58 | |||
59 | static inline void __handle_sysrq(int key, bool check_mask) | ||
63 | { | 60 | { |
64 | return 0; | ||
65 | } | 61 | } |
66 | static inline int __reterr(void) | 62 | |
63 | static inline int register_sysrq_key(int key, struct sysrq_key_op *op) | ||
67 | { | 64 | { |
68 | return -EINVAL; | 65 | return -EINVAL; |
69 | } | 66 | } |
70 | static inline void handle_sysrq(int key, struct tty_struct *tty) | 67 | |
68 | static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) | ||
71 | { | 69 | { |
70 | return -EINVAL; | ||
72 | } | 71 | } |
73 | 72 | ||
74 | #define register_sysrq_key(ig,nore) __reterr() | ||
75 | #define unregister_sysrq_key(ig,nore) __reterr() | ||
76 | |||
77 | #endif | 73 | #endif |
78 | 74 | ||
79 | #endif /* _LINUX_SYSRQ_H */ | 75 | #endif /* _LINUX_SYSRQ_H */ |