qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ne2000 did not save rxcr in state file


From: Juergen Pfennig
Subject: [Qemu-devel] [PATCH] ne2000 did not save rxcr in state file
Date: Mon, 16 Jan 2006 12:57:21 +0100
User-agent: KMail/1.7.2

Hi,
as I promised I will send QEMU patches even if I don't know about QEMU's patch
policy ... Here a very simple one:

Index: hw/ne2000.c
===================================================================
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
--- hw/ne2000.c 14 Jan 2006 13:19:59 -0000      1.1.1.1
+++ hw/ne2000.c 16 Jan 2006 10:10:12 -0000
@@ -643,7 +643,9 @@
 {
        NE2000State* s=(NE2000State*)opaque;
 
-       qemu_put_8s(f, &s->cmd);
+       qemu_put_8s(f, &s->rxcr);         // version 2
+
+       qemu_put_8s(f, &s->cmd);          // version 1 ...
        qemu_put_be32s(f, &s->start);
        qemu_put_be32s(f, &s->stop);
        qemu_put_8s(f, &s->boundary);
@@ -667,7 +669,9 @@
 {
        NE2000State* s=(NE2000State*)opaque;
 
-       if (version_id != 1)
+       if (version_id == 2)
+           qemu_get_8s(f, &s->rxcr);
+       else if (version_id != 1)
            return -EINVAL;
 
        qemu_get_8s(f, &s->cmd);
@@ -726,7 +730,7 @@
              s->macaddr[4],
              s->macaddr[5]);
              
-    register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s);
+    register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s);
 }

This patch is not yet enough to make win2003 happy after a "loadvm" but
it fixes an existing bug.
Yours J├╝rgen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]