aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorHani Benhabiles <kroosec@gmail.com>2014-05-07 23:41:31 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-15 15:16:02 -0400
commitb162b49adc4cc6aa2c2ed0a31998f23dfe5983e6 (patch)
treecfe6485bc55c5b00507a0b86b0b2ef4e52ac1feb /monitor.c
parent40d19394b792fb80dba2f536fc13b5b604780a4d (diff)
monitor: Add netdev_add type argument completion.
Also update the command's documentation. Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index fd50c2dd1f..a3dd3614fc 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4303,6 +4303,21 @@ void chardev_add_completion(ReadLineState *rs, int nb_args, const char *str)
qapi_free_ChardevBackendInfoList(start);
}
+void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str)
+{
+ size_t len;
+ int i;
+
+ if (nb_args != 2) {
+ return;
+ }
+ len = strlen(str);
+ readline_set_completion_index(rs, len);
+ for (i = 0; NetClientOptionsKind_lookup[i]; i++) {
+ add_completion_option(rs, str, NetClientOptionsKind_lookup[i]);
+ }
+}
+
void device_add_completion(ReadLineState *rs, int nb_args, const char *str)
{
GSList *list, *elt;