qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names
@ 2014-07-29 22:22 Hani Benhabiles
  2014-08-01 13:58 ` Luiz Capitulino
  0 siblings, 1 reply; 2+ messages in thread
From: Hani Benhabiles @ 2014-07-29 22:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, lcapitulino

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names
  2014-07-29 22:22 [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names Hani Benhabiles
@ 2014-08-01 13:58 ` Luiz Capitulino
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Capitulino @ 2014-08-01 13:58 UTC (permalink / raw)
  To: Hani Benhabiles; +Cc: qemu-trivial, qemu-devel

On Tue, 29 Jul 2014 23:22:40 +0100
Hani Benhabiles <kroosec@gmail.com> wrote:

> Signed-off-by: Hani Benhabiles <hani@linux.com>

Applied to the qmp-next branch, thanks.

> ---
>  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,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-01 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 22:22 [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names Hani Benhabiles
2014-08-01 13:58 ` Luiz Capitulino

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).