hvm: Exceed maximum number of ioemu's NIC for VNIF.

QEMU should ignore excess NICs instead of failing to initialise.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-05-31 10:58:22 +01:00
1 parent cdcecbefd4
commit 06bdfbd284
1 file changed
+22 -22
+22 -22
View File
@@ -3965,30 +3965,30 @@ static int net_client_init(const char *str)
NICInfo *nd;
uint8_t *macaddr;
if (nb_nics >= MAX_NICS) {
fprintf(stderr, "Too Many NICs\n");
return -1;
}
nd = &nd_table[nb_nics];
macaddr = nd->macaddr;
macaddr[0] = 0x52;
macaddr[1] = 0x54;
macaddr[2] = 0x00;
macaddr[3] = 0x12;
macaddr[4] = 0x34;
macaddr[5] = 0x56 + nb_nics;
if (nb_nics < MAX_NICS) {
nd = &nd_table[nb_nics];
macaddr = nd->macaddr;
macaddr[0] = 0x52;
macaddr[1] = 0x54;
macaddr[2] = 0x00;
macaddr[3] = 0x12;
macaddr[4] = 0x34;
macaddr[5] = 0x56 + nb_nics;
if (get_param_value(buf, sizeof(buf), "macaddr", p)) {
if (parse_macaddr(macaddr, buf) < 0) {
fprintf(stderr, "invalid syntax for ethernet address\n");
return -1;
if (get_param_value(buf, sizeof(buf), "macaddr", p)) {
if (parse_macaddr(macaddr, buf) < 0) {
fprintf(stderr, "invalid syntax for ethernet address\n");
return -1;
}
}
}
if (get_param_value(buf, sizeof(buf), "model", p)) {
nd->model = strdup(buf);
}
nd->vlan = vlan;
nb_nics++;
if (get_param_value(buf, sizeof(buf), "model", p)) {
nd->model = strdup(buf);
}
nd->vlan = vlan;
nb_nics++;
} else {
fprintf(stderr, "Too Many NICs\n");
}
ret = 0;
} else
if (!strcmp(device, "none")) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.