Received: from [140.186.70.92] (port=39872 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtKu1-0000jb-AS for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:13:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtKtz-00078z-K2 for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:13:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtKtz-00078i-9B for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:13:43 -0500 From: Juan Quintela In-Reply-To: (Blue Swirl's message of "Sat, 26 Feb 2011 12:56:41 +0200") References: Date: Sat, 26 Feb 2011 15:12:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 42/58] vmstate: port stellaris gamepad Reply-To: quintela@redhat.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Blue Swirl wrote: > On Thu, Feb 24, 2011 at 7:57 PM, Juan Quintela wrot= e: >> +static const VMStateDescription vmstate_stellaris_button =3D { >> + =C2=A0 =C2=A0.name =3D "stellaris_button", >> + =C2=A0 =C2=A0.version_id =3D 1, >> + =C2=A0 =C2=A0.minimum_version_id =3D 1, >> + =C2=A0 =C2=A0.minimum_version_id_old =3D 1, > > For consistency with other structures, these version fields should be 0. >From the part that you didn't posted. @@ -86,6 +85,5 @@ void stellaris_gamepad_init(int n, qemu_irq *irq, const i= nt *keycode) } s->num_buttons =3D n; qemu_add_kbd_event_handler(stellaris_gamepad_put_key, s); - register_savevm(NULL, "stellaris_gamepad", -1, 1, - stellaris_gamepad_save, stellaris_gamepad_load, s); + vmstate_register(NULL, -1, &vmstate_stellaris_gamepad, s); } --=20 1.7.4 Version is already at ' (4th argument of register_savevm). I just used the version that was there. I agree that some devices had started at version 0 and others at version 1, but that is independent of this series. Later, Juan.