Anthony Liguori <anth...@codemonkey.ws> wrote:
> On 03/23/2011 04:58 AM, Juan Quintela wrote:
>> Anthony Liguori<aligu...@us.ibm.com>  wrote:
>>> I don't fully understand this hack business but we need field to be unique 
>>> so..
>>>
>>> Signed-off-by: Anthony Liguori<aligu...@us.ibm.com>
>>> ---
>>>   hw/eeprom93xx.c |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c
>>> index cfa695d..f1d75ec 100644
>>> --- a/hw/eeprom93xx.c
>>> +++ b/hw/eeprom93xx.c
>>> @@ -114,7 +114,7 @@ static const VMStateInfo vmstate_hack_uint16_from_uint8 
>>> = {
>>>   };
>>>
>>>   #define VMSTATE_UINT16_HACK_TEST(_f, _s, _t)                           \
>>> -    VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint16_from_uint8, 
>>> uint16_t)
>>> +    VMSTATE_SINGLE_TEST_HACK(_f, _s, _t, 0, 
>>> vmstate_hack_uint16_from_uint8, uint16_t)
>>>
>>>   static bool is_old_eeprom_version(void *opaque, int version_id)
>>>   {

> Could we get away with just doing:
>
> VMSTATE_UNUSED(3),
> VMSTATE_UINT8(bar, ...),

Remember that we are "supposed to be" big/little endian safe.

> That's fully compatible on the wire and seems to be a clearer
> expression of exactly what the problem is.

if we are going to break big endian machines, I fully agree.

Later, Juan.

Reply via email to