diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2010-05-24 17:33:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:07:07 -0400 |
commit | f3bc3189a001ec85c7b1119ad4aa5e39eea0f05e (patch) | |
tree | 952cc9922d06af94491ecee754d4d24f9b1e2312 /drivers/xen | |
parent | a321cedb12904114e2ba5041a3673ca24deb09c9 (diff) |
xen: fix build when SYSRQ is disabled
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:
drivers/xen/manage.c:223: error: implicit declaration of function 'handle_sysrq'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/manage.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 8943b8ccee1a..07e857b0de13 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -185,6 +185,7 @@ static void shutdown_handler(struct xenbus_watch *watch, | |||
185 | kfree(str); | 185 | kfree(str); |
186 | } | 186 | } |
187 | 187 | ||
188 | #ifdef CONFIG_MAGIC_SYSRQ | ||
188 | static void sysrq_handler(struct xenbus_watch *watch, const char **vec, | 189 | static void sysrq_handler(struct xenbus_watch *watch, const char **vec, |
189 | unsigned int len) | 190 | unsigned int len) |
190 | { | 191 | { |
@@ -214,15 +215,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec, | |||
214 | handle_sysrq(sysrq_key, NULL); | 215 | handle_sysrq(sysrq_key, NULL); |
215 | } | 216 | } |
216 | 217 | ||
217 | static struct xenbus_watch shutdown_watch = { | ||
218 | .node = "control/shutdown", | ||
219 | .callback = shutdown_handler | ||
220 | }; | ||
221 | |||
222 | static struct xenbus_watch sysrq_watch = { | 218 | static struct xenbus_watch sysrq_watch = { |
223 | .node = "control/sysrq", | 219 | .node = "control/sysrq", |
224 | .callback = sysrq_handler | 220 | .callback = sysrq_handler |
225 | }; | 221 | }; |
222 | #endif | ||
223 | |||
224 | static struct xenbus_watch shutdown_watch = { | ||
225 | .node = "control/shutdown", | ||
226 | .callback = shutdown_handler | ||
227 | }; | ||
226 | 228 | ||
227 | static int setup_shutdown_watcher(void) | 229 | static int setup_shutdown_watcher(void) |
228 | { | 230 | { |
@@ -234,11 +236,13 @@ static int setup_shutdown_watcher(void) | |||
234 | return err; | 236 | return err; |
235 | } | 237 | } |
236 | 238 | ||
239 | #ifdef CONFIG_MAGIC_SYSRQ | ||
237 | err = register_xenbus_watch(&sysrq_watch); | 240 | err = register_xenbus_watch(&sysrq_watch); |
238 | if (err) { | 241 | if (err) { |
239 | printk(KERN_ERR "Failed to set sysrq watcher\n"); | 242 | printk(KERN_ERR "Failed to set sysrq watcher\n"); |
240 | return err; | 243 | return err; |
241 | } | 244 | } |
245 | #endif | ||
242 | 246 | ||
243 | return 0; | 247 | return 0; |
244 | } | 248 | } |