All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/7] monitor: Improve host_net_add
Date: Wed, 15 Apr 2009 14:09:57 +0100	[thread overview]
Message-ID: <1239800997.4431.131.camel@blaa> (raw)
In-Reply-To: <20090414172955.15035.54728.stgit@mchn012c.ww002.siemens.net>

On Tue, 2009-04-14 at 19:29 +0200, Jan Kiszka wrote:
> Fix the documentation of the host_net_add monitor command and allow the
> user to pass no options at all. Moreover, inform the user on the
> monitor terminal if a request failed.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
>  monitor.c |    4 ++--
>  net.c     |    4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/monitor.c b/monitor.c
> index e764b5d..d9f84a7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1730,8 +1730,8 @@ static const mon_cmd_t mon_cmds[] = {
>                                          "add drive to PCI storage controller" },
>      { "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
>      { "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
> -    { "host_net_add", "ss", net_host_device_add,
> -      "[tap,user,socket,vde] options", "add host VLAN client" },
> +    { "host_net_add", "ss?", net_host_device_add,
> +      "tap|user|socket|vde [options]", "add host VLAN client" },
>      { "host_net_remove", "is", net_host_device_remove,
>        "vlan_id name", "remove host VLAN client" },
>  #endif
> diff --git a/net.c b/net.c
> index 0486f7c..e812eb8 100644
> --- a/net.c
> +++ b/net.c
> @@ -1859,7 +1859,9 @@ void net_host_device_add(Monitor *mon, const char *device, const char *opts)
>          monitor_printf(mon, "invalid host network device %s\n", device);
>          return;
>      }
> -    net_client_init(device, opts);
> +    if (net_client_init(device, opts ? : "") < 0) {
> +        monitor_printf(mon, "adding host network device %s failed\n", device);
> +    }
>  }

Looks good to me.

Acked-by: Mark McLoughlin <markmc@redhat.com>

Cheers,
Mark.

  reply	other threads:[~2009-04-15 13:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 17:29 [Qemu-devel] [PATCH 0/7] Various small networking improvements Jan Kiszka
2009-04-14 17:29 ` [Qemu-devel] [PATCH 3/7] net: Check device passed to host_net_remove Jan Kiszka
2009-04-15 13:09   ` Mark McLoughlin
2009-04-15 14:04     ` [Qemu-devel] " Jan Kiszka
2009-04-14 17:29 ` [Qemu-devel] [PATCH 2/7] net: Add VLAN client cleanup handler Jan Kiszka
2009-04-15 13:09   ` Mark McLoughlin
2009-04-15 13:40     ` Mark McLoughlin
2009-04-15 14:13       ` [Qemu-devel] " Jan Kiszka
2009-04-15 17:15         ` Mark McLoughlin
2009-04-15 14:04     ` Jan Kiszka
2009-04-15 17:00       ` Mark McLoughlin
2009-04-15 17:03         ` Jan Kiszka
2009-04-14 17:29 ` [Qemu-devel] [PATCH 1/7] net: Fix -net socket,listen Jan Kiszka
2009-04-15 13:09   ` Mark McLoughlin
2009-04-14 17:29 ` [Qemu-devel] [PATCH 4/7] net: Prevent multiple slirp instances Jan Kiszka
2009-04-15 13:09   ` Mark McLoughlin
2009-04-14 17:29 ` [Qemu-devel] [PATCH 6/7] net: Add support for capturing VLANs Jan Kiszka
2009-04-15 13:10   ` Mark McLoughlin
2009-04-15 14:09     ` [Qemu-devel] " Jan Kiszka
2009-04-15 17:13       ` Mark McLoughlin
2009-04-15 17:16         ` Jan Kiszka
2009-04-14 17:29 ` [Qemu-devel] [PATCH 5/7] monitor: Improve host_net_add Jan Kiszka
2009-04-15 13:09   ` Mark McLoughlin [this message]
2009-04-14 17:29 ` [Qemu-devel] [PATCH 7/7] slirp: Handle DHCP requests for specific IP Jan Kiszka

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=1239800997.4431.131.camel@blaa \
    --to=markmc@redhat.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.