repository: /home/avi/kvm branch: master commit 3e3cded4d8a198b06bf6a532445d662b4b49d6ed Author: Avi Kivity <[EMAIL PROTECTED]> Date: Thu Nov 8 12:24:19 2007 +0200
kvm: qemu: add instance id for ne2000 nics fixes save/restore with multiple nics Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/ne2000.c b/qemu/hw/ne2000.c index 689216c..1a2b91e 100644 --- a/qemu/hw/ne2000.c +++ b/qemu/hw/ne2000.c @@ -143,6 +143,8 @@ typedef struct NE2000State { uint8_t mem[NE2000_MEM_SIZE]; } NE2000State; +static int ne2000_id; + static void ne2000_reset(NE2000State *s) { int i; @@ -750,7 +752,7 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd) s->macaddr[4], s->macaddr[5]); - register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); + register_savevm("ne2000", ne2000_id++, 2, ne2000_save, ne2000_load, s); } /***********************************************************/ @@ -821,5 +823,5 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn) s->macaddr[5]); /* XXX: instance number ? */ - register_savevm("ne2000", 0, 3, ne2000_save, ne2000_load, s); + register_savevm("ne2000", ne2000_id++, 3, ne2000_save, ne2000_load, s); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits