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 <mprivozn@redhat.com>
Message-Id: <ce2790634e6a1b3b6cf90462399d17bad83f0290.1504771369.git.mprivozn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Michal Privoznik 2017-09-07 10:05:25 +02:00 committed by Markus Armbruster
parent 14d53b4f4a
commit 4c7f4426c4
3 changed files with 25 additions and 38 deletions

View file

@ -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);