From 4c7f4426c454f5787154b86406188d90d4c1b267 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 7 Sep 2017 10:05:25 +0200 Subject: watchdog.h: Drop local redefinition of actions enum We already have enum that enumerates all the actions that a watchdog can take when hitting its timeout: WatchdogAction. Use that instead of inventing our own. Signed-off-by: Michal Privoznik Message-Id: Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Reviewed-by: Daniel P. Berrange Signed-off-by: Markus Armbruster --- include/sysemu/watchdog.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/sysemu/watchdog.h b/include/sysemu/watchdog.h index 72a4da07a6..677ace3945 100644 --- a/include/sysemu/watchdog.h +++ b/include/sysemu/watchdog.h @@ -23,15 +23,7 @@ #define QEMU_WATCHDOG_H #include "qemu/queue.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. */ +#include "qapi-types.h" struct WatchdogTimerModel { QLIST_ENTRY(WatchdogTimerModel) entry; @@ -46,7 +38,7 @@ typedef struct WatchdogTimerModel WatchdogTimerModel; /* in hw/watchdog.c */ int select_watchdog(const char *p); int select_watchdog_action(const char *action); -int get_watchdog_action(void); +WatchdogAction get_watchdog_action(void); void watchdog_add_model(WatchdogTimerModel *model); void watchdog_perform_action(void); -- cgit v1.2.3