All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: "Krumme, Chris" <Chris.Krumme@windriver.com>
Cc: Mark McLoughlin <markmc@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] net: Avoid gcc'ism in net_host_device_add
Date: Tue, 28 Apr 2009 21:25:58 +0200	[thread overview]
Message-ID: <49F75846.7040600@web.de> (raw)
In-Reply-To: <58BD0469C48A7443A479A13D101685E3024DC83B@ala-mail09.corp.ad.wrs.com>

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Krumme, Chris wrote:
> Sorry for the last comment, but I was out of town. 
> 
>> -----Original Message-----
>> From: 
>> qemu-devel-bounces+chris.krumme=windriver.com@nongnu.org 
>> [mailto:qemu-devel-bounces+chris.krumme=windriver.com@nongnu.o
>> rg] On Behalf Of Jan Kiszka
>> Sent: Sunday, April 19, 2009 5:04 AM
>> To: qemu-devel@nongnu.org
>> Cc: Mark McLoughlin
>> Subject: [Qemu-devel] [PATCH v2 04/11] monitor: Improve host_net_add
>>
>> 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 652d1f0..ca2a56d 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 ca4d87f..22faa40 100644
>> --- a/net.c
>> +++ b/net.c
>> @@ -1860,7 +1860,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) {
> 
> Is this a gcc extension?  Do we want to introduce this construct to the
> code base.

Valid remark, fix below.

Thanks,
Jan

-------->

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net.c b/net.c
index dcd27fe..ddcdf5b 100644
--- a/net.c
+++ b/net.c
@@ -2085,7 +2085,7 @@ void net_host_device_add(Monitor *mon, const char *device, const char *opts)
         monitor_printf(mon, "invalid host network device %s\n", device);
         return;
     }
-    if (net_client_init(device, opts ? : "") < 0) {
+    if (net_client_init(device, opts ? opts : "") < 0) {
         monitor_printf(mon, "adding host network device %s failed\n", device);
     }
 }


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-04-28 19:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19 10:04 [Qemu-devel] [PATCH v2 00/11] Various small networking improvements Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 03/11] net: Prevent multiple slirp instances Jan Kiszka
2009-04-19 10:37   ` Blue Swirl
2009-04-19 11:51     ` [Qemu-devel] " Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 05/11] monitor: Allow host_net_add/remove for all targets Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 06/11] Allow empty params for check_params Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 02/11] net: Check device passed to host_net_remove Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 04/11] monitor: Improve host_net_add Jan Kiszka
2009-04-28 15:08   ` Krumme, Chris
2009-04-28 19:25     ` Jan Kiszka [this message]
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 01/11] net: Fix -net socket,listen Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 07/11] net: Add parameter checks for VLAN clients Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 09/11] net: Add support for capturing VLANs Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 11/11] slirp: Enhance host-guest redirection setup Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 10/11] slirp: Handle DHCP requests for specific IP Jan Kiszka
2009-04-19 10:04 ` [Qemu-devel] [PATCH v2 08/11] net: Untangle nested qemu_send_packet Jan Kiszka
2009-04-21 20:55 ` [Qemu-devel] [PATCH v2 00/11] Various small networking improvements Anthony Liguori

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=49F75846.7040600@web.de \
    --to=jan.kiszka@web.de \
    --cc=Chris.Krumme@windriver.com \
    --cc=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.