- if (seen_nics != nb_nics) {
- /* Number of NICs requested by user on command line doesn't match
- * the number the model actually registered with us.
- * This will generally only happen for models of embedded boards
- * with no PCI bus or similar. PCI based machines can instantiate
- * all requested NICs as PCI devices but usually embedded boards
- * only have a single NIC.
- */
- fprintf(stderr, "Warning: more nics requested than this machine "
- "supports; some have been ignored\n");
+
+ /* Check that all NICs requested via -net nic actually got created.
+ * NICs created via -device don't need to be checked here because
+ * they are always instantiated.
+ */
+ for (i = 0; i < MAX_NICS; i++) {
+ NICInfo *nd = &nd_table[i];
+ if (nd->used && !nd->instantiated) {
+ fprintf(stderr, "Warning: requested NIC (%s, model %s) "
+ "was not created (not supported by this machine?)\n",
+ nd->name ? nd->name : "anonymous",
+ nd->model ? nd->model : "unspecified");
+ }