Received: from eggs.gnu.org ([2001:4830:134:3::10]:44629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUlGo-0001z8-RV for qemu-devel@nongnu.org; Mon, 31 Mar 2014 19:05:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUlGi-0007UX-Qx for qemu-devel@nongnu.org; Mon, 31 Mar 2014 19:05:34 -0400 From: Hani Benhabiles Date: Tue, 1 Apr 2014 00:05:14 +0100 Message-Id: <1396307114-4123-1-git-send-email-kroosec@gmail.com> Subject: [Qemu-devel] [PATCH] net: Report error when device / hub combo is not found. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, stefanha@redhat.com, aliguori@amazon.com Also convert nearby monitor_printf() call to error_report(). Signed-off-by: Hani Benhabiles --- net/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index e3ef1e4..d319f49 100644 --- a/net/net.c +++ b/net/net.c @@ -952,10 +952,12 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict) nc = net_hub_find_client_by_name(vlan_id, device); if (!nc) { + error_report("Host network device '%s' on hub '%d' not found", + device, vlan_id); return; } if (!net_host_check_device(nc->model)) { - monitor_printf(mon, "invalid host network device %s\n", device); + error_report("invalid host network device '%s'", device); return; } qemu_del_net_client(nc); -- 1.8.3.2