On 04/18/2012 05:42 PM, Juan Quintela wrote:
> Orit Wasserman <owass...@redhat.com> wrote:
>> Signed-off-by: Orit Wasserman <owass...@redhat.com>
>> Signed-off-by: Benoit Hudzia <benoit.hud...@sap.com>
>> Signed-off-by: Petter Svard <pett...@cs.umu.se>
>> Signed-off-by: Aidan Shribman <aidan.shrib...@sap.com>
>> ---
>>  arch_init.c |   26 +++++++++++++++++++++++---
>>  1 files changed, 23 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch_init.c b/arch_init.c
>> index 47b9fef..f1690cf 100644
>> --- a/arch_init.c
>> +++ b/arch_init.c
>> @@ -599,6 +599,18 @@ static inline void *host_from_stream_offset(QEMUFile *f,
>>      return NULL;
>>  }
> 
> Why do we need this patch?
> 
>> +static inline void *host_from_stream_offset_versioned(int version_id,
>> +        QEMUFile *f, ram_addr_t offset, int flags)
>> +{
>> +        void *host;
>> +        if (version_id == 3) {
>> +                host = qemu_get_ram_ptr(offset);
>> +        } else {
>> +                host = host_from_stream_offset(f, offset, flags);
>> +        }
>> +        return host;
>> +}
>> +
>>  int ram_load(QEMUFile *f, void *opaque, int version_id)
>>  {
> 
> int ram_load(QEMUFile *f, void *opaque, int version_id)
> {
>     ram_addr_t addr;
>     int flags;
>     int error;
> 
>     if (version_id < 4 || version_id > 4) {
>         return -EINVAL;
>     }
> 
> As you can see, version_id will never be 3, or I am missing something?
> 
You are correct, one less patch.

Thanks,
Orit
> Later, Juan.
> 



Reply via email to