lkml.org 
[lkml]   [2010]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 3/3 -next] xen: fix build when SYSRQ is disabled
From: Randy Dunlap <randy.dunlap@oracle.com>

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>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
---
drivers/xen/manage.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

--- linux-next-20100325.orig/drivers/xen/manage.c
+++ linux-next-20100325/drivers/xen/manage.c
@@ -194,6 +194,7 @@ static void shutdown_handler(struct xenb
kfree(str);
}

+#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
unsigned int len)
{
@@ -223,15 +224,16 @@ static void sysrq_handler(struct xenbus_
handle_sysrq(sysrq_key, NULL);
}

-static struct xenbus_watch shutdown_watch = {
- .node = "control/shutdown",
- .callback = shutdown_handler
-};
-
static struct xenbus_watch sysrq_watch = {
.node = "control/sysrq",
.callback = sysrq_handler
};
+#endif
+
+static struct xenbus_watch shutdown_watch = {
+ .node = "control/shutdown",
+ .callback = shutdown_handler
+};

static int setup_shutdown_watcher(void)
{
@@ -243,11 +245,13 @@ static int setup_shutdown_watcher(void)
return err;
}

+#ifdef CONFIG_MAGIC_SYSRQ
err = register_xenbus_watch(&sysrq_watch);
if (err) {
printk(KERN_ERR "Failed to set sysrq watcher\n");
return err;
}
+#endif

return 0;
}

\
 
 \ /
  Last update: 2010-03-25 19:35    [W:0.040 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site