aboutsummaryrefslogtreecommitdiff
path: root/hw/ne2000-isa.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-12-02 12:36:46 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:05:58 -0600
commitbe73cfe2be9a41de4f97e4847b3f12a7d6d61159 (patch)
tree83419da906307e90aea6146c88f405aeeb32cf7d /hw/ne2000-isa.c
parent70cca6d87261f3ab330e2be34fbe9596b13342ae (diff)
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ne2000-isa.c')
-rw-r--r--hw/ne2000-isa.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
index 0260f849fd..d2e9283be3 100644
--- a/hw/ne2000-isa.c
+++ b/hw/ne2000-isa.c
@@ -50,6 +50,17 @@ static NetClientInfo net_ne2000_isa_info = {
.cleanup = isa_ne2000_cleanup,
};
+const VMStateDescription vmstate_isa_ne2000 = {
+ .name = "ne2000",
+ .version_id = 2,
+ .minimum_version_id = 0,
+ .minimum_version_id_old = 0,
+ .fields = (VMStateField []) {
+ VMSTATE_STRUCT(ne2000, ISANE2000State, 0, vmstate_ne2000, NE2000State),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static int isa_ne2000_initfn(ISADevice *dev)
{
ISANE2000State *isa = DO_UPCAST(ISANE2000State, dev, dev);
@@ -75,7 +86,6 @@ static int isa_ne2000_initfn(ISADevice *dev)
dev->qdev.info->name, dev->qdev.id, s);
qemu_format_nic_info_str(&s->nic->nc, s->c.macaddr.a);
- vmstate_register(-1, &vmstate_ne2000, s);
return 0;
}