qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] fdc: fix MAX_FD probelm


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH] fdc: fix MAX_FD probelm
Date: Wed, 16 Sep 2009 17:08:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

"TAKEDA, toshiya" <address@hidden> wrote:
> Dear Juan and members,
>
>>address@hidden (武田 俊也) wrote:
>>> Dear members,
>>
>>Hi
>>>  static const VMStateDescription vmstate_fdc = {
>>>      .name = "fdc",
>>> -    .version_id = 2,
>>> -    .minimum_version_id = 2,
>>> -    .minimum_version_id_old = 2,
>>> +    .version_id = 3,
>>> +    .minimum_version_id = 3,
>>> +    .minimum_version_id_old = 3,
>>
>>This is wrong.  You can't move to version 3 without a good reason.  And
>>if you move, you have to retain backward compatibility).
>
>
>>>      .pre_save = fdc_pre_save,
>>>      .post_load = fdc_post_load,
>>>      .fields      = (VMStateField []) {
>>> @@ -692,7 +694,7 @@ static const VMStateDescription vmstate_fdc = {
>>>          VMSTATE_UINT8(lock, fdctrl_t),
>>>          VMSTATE_UINT8(pwrd, fdctrl_t),
>>>          VMSTATE_UINT8_EQUAL(num_floppies, fdctrl_t),
>>> -        VMSTATE_STRUCT_ARRAY(drives, fdctrl_t, MAX_FD, 1,
>>> +        VMSTATE_STRUCT_ARRAY(drives, fdctrl_t, MAX_LOGICAL_FD, 1,
>>
>>Will send a patch with support for:
>>
>>VMSTATE_STRUCT_ARRAY(drives, fdctrl_t, num_floppies, 1, wmstate_fdrive,
>>fdrive_t)
>
> Well, it seems that we cannot specify the variable to WMSTATE_STRUCT_ARRAY.

> And I found the problem that,
> if I defined fdctrl_t->drives as fdrive_t drives[MAX_LOGICAL_FD];
> and specify MAX_FD as VMSTATE_STRUCT_ARRAY(drives, fdctrl_t, MAX_FD, ...)
> it cause the build error on MinGW.
> It seems that we need to specify the same constant value.

I sent patch to support it.  Current code is to send whole arrays (and
it complains if array size and what you send is not the same).

This are the hearders of the mail that gets its support (not tested)

From: Juan Quintela <address@hidden>
Subject: [PATCH 4/4] vmstate: Add support for sending partial arrays
To: address@hidden
Date: Mon, 14 Sep 2009 22:15:21 +0200


Later, Juan.




reply via email to

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