Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198326
b: refs/heads/master
c: f3bc318
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed May 25, 2010
1 parent b46588a commit 8319ab3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a321cedb12904114e2ba5041a3673ca24deb09c9
refs/heads/master: f3bc3189a001ec85c7b1119ad4aa5e39eea0f05e
14 changes: 9 additions & 5 deletions trunk/drivers/xen/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
kfree(str);
}

#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
unsigned int len)
{
Expand Down Expand Up @@ -214,15 +215,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
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)
{
Expand All @@ -234,11 +236,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;
}
Expand Down

0 comments on commit 8319ab3

Please sign in to comment.