From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wob2q-0002Uo-Uh for qemu-devel@nongnu.org; Sun, 25 May 2014 12:13:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wob2h-0002RQ-U4 for qemu-devel@nongnu.org; Sun, 25 May 2014 12:13:08 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:32862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wob2h-0002RD-Nn for qemu-devel@nongnu.org; Sun, 25 May 2014 12:12:59 -0400 Received: by mail-wg0-f46.google.com with SMTP id n12so6803227wgh.17 for ; Sun, 25 May 2014 09:12:59 -0700 (PDT) Date: Sun, 25 May 2014 17:12:55 +0100 From: Hani Benhabiles Message-ID: <20140525161255.GD3588@Inspiron-3521> References: <1400540600-1328-1-git-send-email-kroosec@gmail.com> <1400540600-1328-5-git-send-email-kroosec@gmail.com> <20140523120503.GD1260@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140523120503.GD1260@stefanha-thinkpad.redhat.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: Stefan Hajnoczi Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, stefanha@redhat.com, imammedo@redhat.com On Fri, May 23, 2014 at 02:05:03PM +0200, Stefan Hajnoczi wrote: > 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. > Because "netmap" fails the net_host_check_device() check: (qemu) host_net_add user (qemu) host_net_add foooo invalid host network device foooo (qemu) host_net_add netmap invalid host network device netmap Should "netmap" be added there ? > > 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.) Ok, will add a patch to share the valid_params_list[] in include/net/net.h.