提交 86e11772 编写于 作者: H Hani Benhabiles 提交者: Michael Tokarev

net: Report error when device / hub combo is not found.

Also convert nearby monitor_printf() call to error_report().
Signed-off-by: NHani Benhabiles <hani@linux.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 d61ce900
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册