diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-06-08 21:13:58 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-06-09 12:58:55 +0300 |
commit | 50e32ea8f31035877decc10f1075aa0e619e09cb (patch) | |
tree | 5d4b1a7c353857bcb22ac48e5e640bd4dfc8c16d /vl.c | |
parent | 940cda94dc01e955b6008c47b782817a1ed3b201 (diff) |
net: Fix hotplug with pci_add
The correct model type wasn't getting added when hotplugging nics with
pci_add.
Testcase: start VM with default nic type. In the qemu_monitor:
(qemu) pci_add auto nic model=virtio
This results in a nic hot-plug of the same nic type as the default.
This was broken in 5294e2c774f120e10b44652ac143abda356f44eb
Also changes the behaviour where no .init is defined for a
net_client_type. Previously, 0 was returned, which indicated the init
was successful and that 0 was the index into the nd_tables[] array.
Return -1, indicating unsuccessful init, in such a case.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'vl.c')
0 files changed, 0 insertions, 0 deletions