Blame view
include/linux/sysrq.h
1.84 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 7 8 9 10 11 12 |
/* -*- linux-c -*- * * $Id: sysrq.h,v 1.3 1997/07/17 11:54:33 mj Exp $ * * Linux Magic System Request Key Hacks * * (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> * * (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com> * overhauled to use key registration * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ |
89bbc03c0 [PATCH] Prevent m... |
13 14 |
#ifndef _LINUX_SYSRQ_H #define _LINUX_SYSRQ_H |
1da177e4c Linux-2.6.12-rc2 |
15 |
|
82e3310ac linux/sysrq.h nee... |
16 |
#include <linux/errno.h> |
f335397d1 Input: sysrq - dr... |
17 |
#include <linux/types.h> |
1da177e4c Linux-2.6.12-rc2 |
18 |
|
8c6a98b22 Input: sysrq - en... |
19 20 |
/* Enable/disable SYSRQ support by default (0==no, 1==yes). */ #define SYSRQ_DEFAULT_ENABLE 1 |
1da177e4c Linux-2.6.12-rc2 |
21 22 23 24 25 26 27 28 29 30 31 32 |
/* Possible values of bitmask for enabling sysrq functions */ /* 0x0001 is reserved for enable everything */ #define SYSRQ_ENABLE_LOG 0x0002 #define SYSRQ_ENABLE_KEYBOARD 0x0004 #define SYSRQ_ENABLE_DUMP 0x0008 #define SYSRQ_ENABLE_SYNC 0x0010 #define SYSRQ_ENABLE_REMOUNT 0x0020 #define SYSRQ_ENABLE_SIGNAL 0x0040 #define SYSRQ_ENABLE_BOOT 0x0080 #define SYSRQ_ENABLE_RTNICE 0x0100 struct sysrq_key_op { |
1495cc9df Input: sysrq - dr... |
33 |
void (*handler)(int); |
1da177e4c Linux-2.6.12-rc2 |
34 35 36 37 38 39 40 41 42 43 44 |
char *help_msg; char *action_msg; int enable_mask; }; #ifdef CONFIG_MAGIC_SYSRQ /* Generic SysRq interface -- you may call it from any device driver, supplying * ASCII code of the key, pointer to registers and kbd/tty structs (if they * are available -- else NULL's). */ |
f335397d1 Input: sysrq - dr... |
45 46 |
void handle_sysrq(int key); void __handle_sysrq(int key, bool check_mask); |
5d6f647fc [PATCH] debug: ad... |
47 48 |
int register_sysrq_key(int key, struct sysrq_key_op *op); int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
1da177e4c Linux-2.6.12-rc2 |
49 |
struct sysrq_key_op *__sysrq_get_key_op(int key); |
97f5f0cd8 Input: implement ... |
50 |
int sysrq_toggle_support(int enable_mask); |
1da177e4c Linux-2.6.12-rc2 |
51 |
#else |
f335397d1 Input: sysrq - dr... |
52 |
static inline void handle_sysrq(int key) |
5d6f647fc [PATCH] debug: ad... |
53 |
{ |
5d6f647fc [PATCH] debug: ad... |
54 |
} |
97f5f0cd8 Input: implement ... |
55 |
|
f335397d1 Input: sysrq - dr... |
56 |
static inline void __handle_sysrq(int key, bool check_mask) |
1495cc9df Input: sysrq - dr... |
57 58 |
{ } |
97f5f0cd8 Input: implement ... |
59 |
static inline int register_sysrq_key(int key, struct sysrq_key_op *op) |
1da177e4c Linux-2.6.12-rc2 |
60 61 62 |
{ return -EINVAL; } |
97f5f0cd8 Input: implement ... |
63 64 |
static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) |
5d6f647fc [PATCH] debug: ad... |
65 |
{ |
97f5f0cd8 Input: implement ... |
66 |
return -EINVAL; |
5d6f647fc [PATCH] debug: ad... |
67 |
} |
1da177e4c Linux-2.6.12-rc2 |
68 |
|
1da177e4c Linux-2.6.12-rc2 |
69 |
#endif |
89bbc03c0 [PATCH] Prevent m... |
70 71 |
#endif /* _LINUX_SYSRQ_H */ |