From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lurak-0005hP-PU for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:11:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Luraj-0005gS-VR for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:11:06 -0400 Received: from [199.232.76.173] (port=55445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Luraj-0005gD-NX for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:11:05 -0400 Received: from savannah.gnu.org ([199.232.41.3]:36469 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Luraj-00021O-5X for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:11:05 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lurai-0004mu-JN for qemu-devel@nongnu.org; Fri, 17 Apr 2009 17:11:04 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lurai-0004mo-A5 for qemu-devel@nongnu.org; Fri, 17 Apr 2009 17:11:04 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 17 Apr 2009 17:11:04 +0000 Subject: [Qemu-devel] [7149] Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7149 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7149 Author: aliguori Date: 2009-04-17 17:11:03 +0000 (Fri, 17 Apr 2009) Log Message: ----------- 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/eepro100.c Modified: trunk/hw/eepro100.c =================================================================== --- trunk/hw/eepro100.c 2009-04-17 17:10:59 UTC (rev 7148) +++ trunk/hw/eepro100.c 2009-04-17 17:11:03 UTC (rev 7149) @@ -1710,15 +1710,14 @@ 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 @@ 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 */