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>
This commit is contained in:
Peter Maydell 2011-05-20 16:50:01 +01:00 committed by Anthony Liguori
parent 641f6eae75
commit 48e2faf222
3 changed files with 18 additions and 1 deletions

3
net.h
View file

@ -133,7 +133,8 @@ struct NICInfo {
char *devaddr;
VLANState *vlan;
VLANClientState *netdev;
int used;
int used; /* is this slot in nd_table[] being used? */
int instantiated; /* does this NICInfo correspond to an instantiated NIC? */
int nvectors;
};