aboutsummaryrefslogtreecommitdiff
path: root/hw/watchdog/watchdog.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-28 11:46:33 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-28 11:46:34 +0000
commit357e81c7e880f868833edf9f53cce1f3b09ea8ec (patch)
treecf82332ce2788845f63c24db676407f949b5ea38 /hw/watchdog/watchdog.c
parent8fd9dece6599eb3fbd2cdd3e7fbdd4e575e33911 (diff)
parent234779a2b9141d9386289ba5ed86c9d617567646 (diff)
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20160128' into staging
Mostly bugfixes and small improvements; and the gdb target.xml patch. # gpg: Signature made Thu 28 Jan 2016 11:02:14 GMT using RSA key ID C6F02FAF # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" * remotes/cohuck/tags/s390x-20160128: s390x: s390_cpu_get_phys_page_debug has to return -1 gdb: provide the name of the architecture in the target.xml s390x/css: fix control flags during csch watchdog/diag288: don't reset for action=none|debug|pause watchdog: introduction of get_watchdog_action s390x: fix generation of event information crw s390x/ioinst: set type and len for SEI response s390x/sclp: add device to the sysbus in sclp_realize s390x/machine: make addon register fields static s390x/skeys: Fix instance and class size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/watchdog/watchdog.c')
-rw-r--r--hw/watchdog/watchdog.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index 8d4b0eeeb0..81de0e50b1 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -29,15 +29,6 @@
#include "qapi-event.h"
#include "hw/nmi.h"
-/* Possible values for action parameter. */
-#define WDT_RESET 1 /* Hard reset. */
-#define WDT_SHUTDOWN 2 /* Shutdown. */
-#define WDT_POWEROFF 3 /* Quit. */
-#define WDT_PAUSE 4 /* Pause. */
-#define WDT_DEBUG 5 /* Prints a message and continues running. */
-#define WDT_NONE 6 /* Do nothing. */
-#define WDT_NMI 7 /* Inject nmi into the guest */
-
static int watchdog_action = WDT_RESET;
static QLIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list;
@@ -105,6 +96,11 @@ int select_watchdog_action(const char *p)
return 0;
}
+int get_watchdog_action(void)
+{
+ return watchdog_action;
+}
+
/* This actually performs the "action" once a watchdog has expired,
* ie. reboot, shutdown, exit, etc.
*/