qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch 12/24] QEMU/KVM: add net_client_uninit


From: Marcelo Tosatti
Subject: [Qemu-devel] [patch 12/24] QEMU/KVM: add net_client_uninit
Date: Tue, 11 Mar 2008 17:12:03 -0300
User-agent: quilt/0.46-1

Signed-off-by: Marcelo Tosatti <address@hidden>

Index: kvm-userspace.hotplug2/qemu/net.h
===================================================================
--- kvm-userspace.hotplug2.orig/qemu/net.h
+++ kvm-userspace.hotplug2/qemu/net.h
@@ -38,6 +38,7 @@ void do_info_network(void);
 int hack_around_tap(void *opaque);
 
 int net_client_init(const char *str);
+void net_client_uninit(NICInfo *nd);
 
 /* NIC info */
 
Index: kvm-userspace.hotplug2/qemu/vl.c
===================================================================
--- kvm-userspace.hotplug2.orig/qemu/vl.c
+++ kvm-userspace.hotplug2/qemu/vl.c
@@ -4937,6 +4937,14 @@ int net_client_init(const char *str)
     return ret;
 }
 
+void net_client_uninit(NICInfo *nd)
+{
+    nd->vlan->nb_guest_devs--; /* XXX: free vlan on last reference */
+    nb_nics--;
+    nd->used = 0;
+    free(nd->model);
+}
+
 void do_info_network(void)
 {
     VLANState *vlan;

-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]