From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnoE8-00048m-JF for qemu-devel@nongnu.org; Fri, 23 May 2014 08:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnoDz-0007ig-IA for qemu-devel@nongnu.org; Fri, 23 May 2014 08:05:32 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:60592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnoDz-0007iV-2V for qemu-devel@nongnu.org; Fri, 23 May 2014 08:05:23 -0400 Received: by mail-ee0-f43.google.com with SMTP id d17so3569108eek.16 for ; Fri, 23 May 2014 05:05:22 -0700 (PDT) Date: Fri, 23 May 2014 14:05:03 +0200 From: Stefan Hajnoczi Message-ID: <20140523120503.GD1260@stefanha-thinkpad.redhat.com> References: <1400540600-1328-1-git-send-email-kroosec@gmail.com> <1400540600-1328-5-git-send-email-kroosec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400540600-1328-5-git-send-email-kroosec@gmail.com> Subject: Re: [Qemu-devel] [PATCH 4/7] monitor: Add host_net_add device argument completion. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hani Benhabiles Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, stefanha@redhat.com, imammedo@redhat.com On Tue, May 20, 2014 at 12:03:17AM +0100, Hani Benhabiles wrote: > diff --git a/hmp-commands.hx b/hmp-commands.hx > index 919af6e..6aaec1b 100644 > --- a/hmp-commands.hx > +++ b/hmp-commands.hx > @@ -1209,9 +1209,10 @@ ETEXI > { > .name = "host_net_add", > .args_type = "device:s,opts:s?", > - .params = "tap|user|socket|vde|netmap|dump [options]", > + .params = "tap|user|socket|vde|bridge|dump [options]", Why did you delete "netmap"? I guess "bridge" should have been appended. > diff --git a/monitor.c b/monitor.c > index 6a3a5c9..365c66a 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -4593,6 +4593,20 @@ void migrate_set_capability_completion(ReadLineState *rs, int nb_args, > } > } > > +void host_net_add_completion(ReadLineState *rs, int nb_args, const char *str) > +{ > + if (nb_args != 2) { > + return; > + } > + readline_set_completion_index(rs, strlen(str)); > + add_completion_option(rs, str, "tap"); > + add_completion_option(rs, str, "user"); > + add_completion_option(rs, str, "socket"); > + add_completion_option(rs, str, "vde"); > + add_completion_option(rs, str, "dump"); > + add_completion_option(rs, str, "bridge"); Please take a look at net_host_check_device() and share the list from there. (Some of the netdevs depend on build-time options.)