aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorHani Benhabiles <kroosec@gmail.com>2014-07-29 23:22:40 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2014-08-18 14:39:10 -0400
commit4bb08af34e8961e912855d00b946654500799385 (patch)
tree2ca93ae27de94b165d4c14a89082140f18a01236 /monitor.c
parent08ab59770da57648bfb8fc9be37f0ef7fb50b0f9 (diff)
downloadqemu-4bb08af34e8961e912855d00b946654500799385.zip
qemu-4bb08af34e8961e912855d00b946654500799385.tar.gz
qemu-4bb08af34e8961e912855d00b946654500799385.tar.bz2
monitor: Remove hardcoded watchdog event names
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/monitor.c b/monitor.c
index cdbaa60..48f0fdc 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4521,16 +4521,15 @@ void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str)
void watchdog_action_completion(ReadLineState *rs, int nb_args, const char *str)
{
+ int i;
+
if (nb_args != 2) {
return;
}
readline_set_completion_index(rs, strlen(str));
- add_completion_option(rs, str, "reset");
- add_completion_option(rs, str, "shutdown");
- add_completion_option(rs, str, "poweroff");
- add_completion_option(rs, str, "pause");
- add_completion_option(rs, str, "debug");
- add_completion_option(rs, str, "none");
+ for (i = 0; WatchdogExpirationAction_lookup[i]; i++) {
+ add_completion_option(rs, str, WatchdogExpirationAction_lookup[i]);
+ }
}
void migrate_set_capability_completion(ReadLineState *rs, int nb_args,