summaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-05-20 16:50:01 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:18:39 -0500
commit48e2faf222cbf4abab7c8e4b3f44229ec98eae7f (patch)
tree394889ebf5ddfaa49862b934fd89a16a7b7bcc5c /hw/qdev.c
parent641f6eae757e5b2cf854fec14038ffd229e9adea (diff)
downloadqemu-48e2faf222cbf4abab7c8e4b3f44229ec98eae7f.zip
net: Warn about "-net nic" options which were ignored
Diagnose the case where the user asked for a NIC via "-net nic" but the board didn't instantiate that NIC (for example where the user asked for two NICs but the board only supports one). Note that this diagnostic doesn't apply to NICs created through -device, because those are always instantiated. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 9519f5dd57..2987901983 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -468,6 +468,7 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
qdev_prop_exists(dev, "vectors")) {
qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
}
+ nd->instantiated = 1;
}
BusState *qdev_get_child_bus(DeviceState *dev, const char *name)