[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] Use NICInfo::model for eepro100 savevm ID strin
From: |
Mark McLoughlin |
Subject: |
[Qemu-devel] [PATCH 8/9] Use NICInfo::model for eepro100 savevm ID string |
Date: |
Wed, 15 Apr 2009 17:29:28 +0100 |
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 <address@hidden>
---
hw/eepro100.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 0a343df..c72b990 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1710,15 +1710,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);
@@ -1757,24 +1756,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 */
--
1.6.0.6
- [Qemu-devel] [PATCH 0/9] Misc networking fixes, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 1/9] Remove stray GSO code from virtio_net, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 2/9] struct iovec is now universally available, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 3/9] Fix error handling in net_client_init(), Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 4/9] Don't fail PCI hotplug if no NIC model is supplied, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 5/9] Remove some useless malloc() checking, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 6/9] Remove NICInfo from e1000 and mipsnet state, Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 7/9] Add unregister_savevm(), Mark McLoughlin, 2009/04/15
- [Qemu-devel] [PATCH 8/9] Use NICInfo::model for eepro100 savevm ID string,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 9/9] Introduce VLANClientState::cleanup(), Mark McLoughlin, 2009/04/15
- [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Jan Kiszka, 2009/04/15
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Marcelo Tosatti, 2009/04/15
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), M. Warner Losh, 2009/04/15
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Mark McLoughlin, 2009/04/16
- [Qemu-devel] [PATCH 09/09 v2] Introduce VLANClientState::cleanup(), Mark McLoughlin, 2009/04/16
- [Qemu-devel] [PATCH 10/09] Free VLANClientState using qemu_free(), Mark McLoughlin, 2009/04/16
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Marcelo Tosatti, 2009/04/16
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Paul Brook, 2009/04/28
- Re: [Qemu-devel] Re: [PATCH 9/9] Introduce VLANClientState::cleanup(), Anthony Liguori, 2009/04/28