mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
qemu: net/drive add/remove tweaks (Marcelo Tosatti)
Export net/drive add/remove functions for device hotplug usage. Return the table index on add. Return failure instead of exiting if limit has been reached on drive_add. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6599 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ec691c804f
commit
4d73cd3b3f
3 changed files with 11 additions and 8 deletions
2
net.c
2
net.c
|
@ -1597,7 +1597,7 @@ int net_client_init(const char *device, const char *p)
|
|||
name = NULL;
|
||||
nb_nics++;
|
||||
vlan->nb_guest_devs++;
|
||||
ret = 0;
|
||||
ret = idx;
|
||||
} else
|
||||
if (!strcmp(device, "none")) {
|
||||
/* does nothing. It is needed to signal that no network cards
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue