qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 42/58] vmstate: port stellaris gamepad


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 42/58] vmstate: port stellaris gamepad
Date: Sat, 26 Feb 2011 15:12:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Blue Swirl <address@hidden> wrote:
> On Thu, Feb 24, 2011 at 7:57 PM, Juan Quintela <address@hidden> wrote:
>> +static const VMStateDescription vmstate_stellaris_button = {
>> +    .name = "stellaris_button",
>> +    .version_id = 1,
>> +    .minimum_version_id = 1,
>> +    .minimum_version_id_old = 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 int 
*keycode)
     }
     s->num_buttons = 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);
 }
-- 
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.



reply via email to

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