summaryrefslogtreecommitdiff
path: root/include/linux/sysrq.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:20:15 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:20:15 -0800
commit5bf3be033f504f5fd79690fbb13d720407314e40 (patch)
tree96b4fdb8c54f2477829c648e6078a0e54f5e7a6e /include/linux/sysrq.h
parent98b8803038fa999212c37952adad1e04144f0ab7 (diff)
v2.4.10.1 -> v2.4.10.2
- me/Al Viro: fix bdget() oops with block device modules that don't clean up after they exit - Alan Cox: continued merging (drivers, license tags) - David Miller: sparc update, network fixes - Christoph Hellwig: work around broken drivers that add a gendisk more than once - Jakub Jelinek: handle more ELF loading special cases - Trond Myklebust: NFS client and lockd reclaimer cleanups/fixes - Greg KH: USB updates - Mikael Pettersson: sparate out local APIC / IO-APIC config options
Diffstat (limited to 'include/linux/sysrq.h')
-rw-r--r--include/linux/sysrq.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index de03136e551a..1e484e5fd032 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -24,6 +24,8 @@ struct sysrq_key_op {
char *action_msg;
};
+#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).
@@ -42,7 +44,6 @@ void __handle_sysrq_nolock(int, struct pt_regs *,
struct kbd_struct *, struct tty_struct *);
-#ifdef CONFIG_MAGIC_SYSRQ
/*
* Sysrq registration manipulation functions
@@ -55,7 +56,8 @@ void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p);
extern __inline__ int
__sysrq_swap_key_ops_nolock(int key, struct sysrq_key_op *insert_op_p,
- struct sysrq_key_op *remove_op_p) {
+ struct sysrq_key_op *remove_op_p)
+{
int retval;
if (__sysrq_get_key_op(key) == remove_op_p) {
__sysrq_put_key_op(key, insert_op_p);
@@ -87,10 +89,18 @@ static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op_p)
}
#else
-#define register_sysrq_key(a,b) do {} while(0)
-#define unregister_sysrq_key(a,b) do {} while(0)
+
+static inline int __reterr(void)
+{
+ return -EINVAL;
+}
+
+#define register_sysrq_key(ig,nore) __reterr()
+#define unregister_sysrq_key(ig,nore) __reterr()
+
#endif
+
/* Deferred actions */
extern int emergency_sync_scheduled;