diff options
author | Hani Benhabiles <kroosec@gmail.com> | 2014-07-29 23:22:40 +0100 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-08-18 14:39:10 -0400 |
commit | 4bb08af34e8961e912855d00b946654500799385 (patch) | |
tree | 2ca93ae27de94b165d4c14a89082140f18a01236 | |
parent | 08ab59770da57648bfb8fc9be37f0ef7fb50b0f9 (diff) | |
download | qemu-4bb08af34e8961e912855d00b946654500799385.zip |
monitor: Remove hardcoded watchdog event names
Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r-- | monitor.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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, |