From: Hani Benhabiles <kroosec@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names
Date: Tue, 29 Jul 2014 23:22:40 +0100 [thread overview]
Message-ID: <1406672560-21029-1-git-send-email-kroosec@gmail.com> (raw)
Signed-off-by: Hani Benhabiles <hani@linux.com>
---
monitor.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/monitor.c b/monitor.c
index 5bc70a6..7465775 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4520,16 +4520,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,
--
1.8.3.2
next reply other threads:[~2014-07-29 22:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 22:22 Hani Benhabiles [this message]
2014-08-01 13:58 ` [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406672560-21029-1-git-send-email-kroosec@gmail.com \
--to=kroosec@gmail.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).