提交 56512e1d 编写于 作者: J Jason Wang 提交者: Peter Maydell

net: hub: suppress warnings of no host network for qtest

If we want to qtest through hub, it would be much more simpler and
safer to configure the hub without host network. So silent this
warnings for qtest.
Signed-off-by: NJason Wang <jasowang@redhat.com>
Reviewed-by: NThomas Huth <thuth@redhat.com>
Message-id: 20181204035347.6148-3-jasowang@redhat.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 25c01bd1
......@@ -20,6 +20,7 @@
#include "hub.h"
#include "qemu/iov.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
/*
* A hub broadcasts incoming packets to all its ports except the source port.
......@@ -346,7 +347,7 @@ void net_hub_check_clients(void)
if (has_host_dev && !has_nic) {
warn_report("hub %d with no nics", hub->id);
}
if (has_nic && !has_host_dev) {
if (has_nic && !has_host_dev && !qtest_enabled()) {
warn_report("hub %d is not connected to host network", hub->id);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册