aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-04-25 13:56:19 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-01 09:44:11 -0500
commit9dd986ccf68f142aaafe543d80cf877716d91d4e (patch)
tree3e9627e3ca3e9414e652ae4085401b0af6b050f5 /monitor.c
parentffad4116b96e29e0fbe892806f97c0a6c903d30d (diff)
Hardware watchdog
Here is an updated hardware watchdog patch, which should fix everything that was raised about the previous version ... Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index b33fea1117..d64f459a6e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -27,6 +27,7 @@
#include "hw/pcmcia.h"
#include "hw/pc.h"
#include "hw/pci.h"
+#include "hw/watchdog.h"
#include "gdbstub.h"
#include "net.h"
#include "qemu-char.h"
@@ -597,6 +598,13 @@ static void do_gdbserver(Monitor *mon, const char *device)
}
#endif
+static void do_watchdog_action(Monitor *mon, const char *action)
+{
+ if (select_watchdog_action(action) == -1) {
+ monitor_printf(mon, "Unknown watchdog action '%s'\n", action);
+ }
+}
+
static void monitor_printc(Monitor *mon, int c)
{
monitor_printf(mon, "'");
@@ -1762,6 +1770,8 @@ static const mon_cmd_t mon_cmds[] = {
"target", "request VM to change it's memory allocation (in MB)" },
{ "set_link", "ss", do_set_link,
"name up|down", "change the link status of a network adapter" },
+ { "watchdog_action", "s", do_watchdog_action,
+ "[reset|shutdown|poweroff|pause|debug|none]", "change watchdog action" },
{ "acl", "sss?i?", do_acl, "<command> <aclname> [<match> [<index>]]\n",
"acl show vnc.username\n"
"acl policy vnc.username deny\n"