Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EyUPr-00019y-OW for qemu-devel@nongnu.org; Mon, 16 Jan 2006 08:29:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EyTmH-0000Vd-GR for qemu-devel@nongnu.org; Mon, 16 Jan 2006 07:48:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EyTeP-00083l-9v for qemu-devel@nongnu.org; Mon, 16 Jan 2006 07:39:58 -0500 Received: from [212.227.126.171] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EyThu-00069F-IU for qemu-devel@nongnu.org; Mon, 16 Jan 2006 07:43:34 -0500 Received: from alpha9.centauri.home ([10.21.2.7]) by alpha0.centauri.home with esmtp (Exim 4.54) id 1EyTc3-0000n5-IA for qemu-devel@nongnu.org; Mon, 16 Jan 2006 13:37:31 +0100 From: Juergen Pfennig Date: Mon, 16 Jan 2006 13:37:31 +0100 References: <200601161257.21527.info@j-pfennig.de> In-Reply-To: <200601161257.21527.info@j-pfennig.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200601161337.31149.info@j-pfennig.de> Subject: [Qemu-devel] [PATCH] ne2000 did not save rxcr in state file (2nd try) 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 Hi (on my 1st try some lines at the end of the patch were missing) as I promised I will send QEMU patches even if I don't know about QEMU's pa= tch policy ... Here a very simple one: Index: hw/ne2000.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/Cvsroot/qemu/hw/ne2000.c,v retrieving revision 1.1.1.1 diff -B -b -U3 -r1.1.1.1 ne2000.c =2D-- hw/ne2000.c=C2=A014 Jan 2006 13:19:59 -0000=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A01.1.1.1 +++ hw/ne2000.c=C2=A016 Jan 2006 10:10:12 -0000 @@ -643,7 +643,9 @@ =C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NE2000State* s=3D(NE2000Sta= te*)opaque; =C2=A0 =2D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0qemu_put_8s(f, &s->cmd); + =C2=A0 =C2=A0 =C2=A0 qemu_put_8s(f, &s->rxcr); =C2=A0 =C2=A0 =C2=A0 =C2= =A0 // version 2 + + =C2=A0 =C2=A0 =C2=A0 qemu_put_8s(f, &s->cmd); =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0// version 1 ... =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0qemu_put_be32s(f, &s->start= ); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0qemu_put_be32s(f, &s->stop); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0qemu_put_8s(f, &s->boundary= ); @@ -667,7 +669,9 @@ =C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NE2000State* s=3D(NE2000Sta= te*)opaque; =C2=A0 =2D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (version_id !=3D 1) + =C2=A0 =C2=A0 =C2=A0 if (version_id =3D=3D 2) + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 qemu_get_8s(f, &s->rxcr); + =C2=A0 =C2=A0 =C2=A0 else if (version_id !=3D 1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return -EINVAL; =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0qemu_get_8s(f, &s->cmd); @@ -726,7 +730,7 @@ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s->macaddr[4], =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s->macaddr[5]); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=20 =2D =C2=A0 =C2=A0register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, = s); + =C2=A0 =C2=A0register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); } =20 /***********************************************************/ @@ -796,7 +800,7 @@ s->macaddr[5]); =20 /* XXX: instance number ? */ =2D register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s); + register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); register_savevm("ne2000_pci", 0, 1, generic_pci_save, generic_pci_load= ,=20 &d->dev); } This patch is not yet enough to make win2003 happy after a "loadvm" but it fixes an existing bug. Yours J=C3=BCrgen