mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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>
This commit is contained in:
parent
a321cedb12
commit
f3bc3189a0
@ -185,6 +185,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
|
|||||||
kfree(str);
|
kfree(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MAGIC_SYSRQ
|
||||||
static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
||||||
unsigned int len)
|
unsigned int len)
|
||||||
{
|
{
|
||||||
@ -214,15 +215,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
|||||||
handle_sysrq(sysrq_key, NULL);
|
handle_sysrq(sysrq_key, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct xenbus_watch shutdown_watch = {
|
|
||||||
.node = "control/shutdown",
|
|
||||||
.callback = shutdown_handler
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct xenbus_watch sysrq_watch = {
|
static struct xenbus_watch sysrq_watch = {
|
||||||
.node = "control/sysrq",
|
.node = "control/sysrq",
|
||||||
.callback = sysrq_handler
|
.callback = sysrq_handler
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static struct xenbus_watch shutdown_watch = {
|
||||||
|
.node = "control/shutdown",
|
||||||
|
.callback = shutdown_handler
|
||||||
|
};
|
||||||
|
|
||||||
static int setup_shutdown_watcher(void)
|
static int setup_shutdown_watcher(void)
|
||||||
{
|
{
|
||||||
@ -234,11 +236,13 @@ static int setup_shutdown_watcher(void)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MAGIC_SYSRQ
|
||||||
err = register_xenbus_watch(&sysrq_watch);
|
err = register_xenbus_watch(&sysrq_watch);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "Failed to set sysrq watcher\n");
|
printk(KERN_ERR "Failed to set sysrq watcher\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user