Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwM55-0006dl-IU for qemu-devel@nongnu.org; Tue, 21 Apr 2009 15:56:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwM54-0006cp-Ed for qemu-devel@nongnu.org; Tue, 21 Apr 2009 15:56:34 -0400 Received: from [199.232.76.173] (port=39668 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwM54-0006cf-5f for qemu-devel@nongnu.org; Tue, 21 Apr 2009 15:56:34 -0400 Received: from savannah.gnu.org ([199.232.41.3]:35682 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwM53-00026q-Sf for qemu-devel@nongnu.org; Tue, 21 Apr 2009 15:56:33 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LwM53-0007td-Ca for qemu-devel@nongnu.org; Tue, 21 Apr 2009 19:56:33 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LwM53-0007tW-5H for qemu-devel@nongnu.org; Tue, 21 Apr 2009 19:56:33 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 21 Apr 2009 19:56:33 +0000 Subject: [Qemu-devel] [7201] monitor: Improve host_net_add (Jan Kiszka) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7201 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7201 Author: aliguori Date: 2009-04-21 19:56:32 +0000 (Tue, 21 Apr 2009) Log Message: ----------- monitor: Improve host_net_add (Jan Kiszka) 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/monitor.c trunk/net.c Modified: trunk/monitor.c =================================================================== --- trunk/monitor.c 2009-04-21 19:56:28 UTC (rev 7200) +++ trunk/monitor.c 2009-04-21 19:56:32 UTC (rev 7201) @@ -1730,8 +1730,8 @@ "add drive to PCI storage controller" }, { "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[:]:] 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=[[:]:]", "hot remove PCI device" }, - { "host_net_add", "ss", net_host_device_add, - "[tap,user,socket,vde,dump] options", "add host VLAN client" }, + { "host_net_add", "ss?", net_host_device_add, + "tap|user|socket|vde|dump [options]", "add host VLAN client" }, { "host_net_remove", "is", net_host_device_remove, "vlan_id name", "remove host VLAN client" }, #endif Modified: trunk/net.c =================================================================== --- trunk/net.c 2009-04-21 19:56:28 UTC (rev 7200) +++ trunk/net.c 2009-04-21 19:56:32 UTC (rev 7201) @@ -2042,7 +2042,9 @@ 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); + } } void net_host_device_remove(Monitor *mon, int vlan_id, const char *device)