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: Blue Swirl
Subject: [Qemu-devel] Re: [PATCH 42/58] vmstate: port stellaris gamepad
Date: Sat, 26 Feb 2011 18:32:34 +0200

On Sat, Feb 26, 2011 at 4:12 PM, Juan Quintela <address@hidden> wrote:
> 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.

The patch introduces two VMState structures, main VMState for the
whole gamepad and a secondary VMState for button structures. The
version for main VMState is OK at 1, but I was talking about the
button substructure VMState version, which is 0 in other patches.



reply via email to

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