summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-17 18:06:50 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-17 18:06:50 +0000
commit1ed3d07a22ab918037379b21e92090a7072707bf (patch)
treeb5da4c064a82af1dddc9d80d56c4d847c824ef90
parent00f56b3dcfd20ad053706342a848951051a760ea (diff)
downloadqemu-1ed3d07a22ab918037379b21e92090a7072707bf.tar.gz
Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)
NICInfo::model will always be identical to the device name strings we're currently passing to nic_init(). Just re-use NICInfo::model. This makes it clear why we use vc->model for unregister_savevm() in a subsequent patch. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7159 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/eepro100.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 790192aaed..ab3d1473b8 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1735,15 +1735,14 @@ static void nic_save(QEMUFile * f, void *opaque)
qemu_put_buffer(f, s->configuration, sizeof(s->configuration));
}
-static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd,
- const char *name, uint32_t device)
+static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd, uint32_t device)
{
PCIEEPRO100State *d;
EEPRO100State *s;
logout("\n");
- d = (PCIEEPRO100State *) pci_register_device(bus, name,
+ d = (PCIEEPRO100State *) pci_register_device(bus, nd->model,
sizeof(PCIEEPRO100State), -1,
NULL, NULL);
@@ -1782,24 +1781,23 @@ static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd,
qemu_register_reset(nic_reset, s);
- register_savevm(name, -1, 3, nic_save, nic_load, s);
+ register_savevm(s->vc->model, -1, 3, nic_save, nic_load, s);
return (PCIDevice *)d;
}
PCIDevice *pci_i82551_init(PCIBus * bus, NICInfo * nd, int devfn)
{
- return nic_init(bus, nd, "i82551", i82551);
- //~ uint8_t *pci_conf = d->dev.config;
+ return nic_init(bus, nd, i82551);
}
PCIDevice *pci_i82557b_init(PCIBus * bus, NICInfo * nd, int devfn)
{
- return nic_init(bus, nd, "i82557b", i82557B);
+ return nic_init(bus, nd, i82557B);
}
PCIDevice *pci_i82559er_init(PCIBus * bus, NICInfo * nd, int devfn)
{
- return nic_init(bus, nd, "i82559er", i82559ER);
+ return nic_init(bus, nd, i82559ER);
}
/* eof */