diff mbox

[06/18] bugfix: wrong error set by ram_control_load_hook()

Message ID 1377069536-12658-7-git-send-email-lilei@linux.vnet.ibm.com
State New
Headers show

Commit Message

Lei Li Aug. 21, 2013, 7:18 a.m. UTC
It should set negative error value if there has been an error.

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini Aug. 21, 2013, 10:40 a.m. UTC | #1
Il 21/08/2013 09:18, Lei Li ha scritto:
> It should set negative error value if there has been an error.
> 
> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
> ---
>  savevm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/savevm.c b/savevm.c
> index 1522d95..f10e031 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags)
>  
>  void ram_control_load_hook(QEMUFile *f, uint64_t flags)
>  {
> -    int ret = 0;
> +    int ret = -1;

-EINVAL

otherwise looks good thanks!

Paolo

>      if (f->ops->hook_ram_load) {
>          ret = f->ops->hook_ram_load(f, f->opaque, flags);
>
Lei Li Aug. 23, 2013, 3:22 a.m. UTC | #2
On 08/21/2013 06:40 PM, Paolo Bonzini wrote:
> Il 21/08/2013 09:18, Lei Li ha scritto:
>> It should set negative error value if there has been an error.
>>
>> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
>> ---
>>   savevm.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/savevm.c b/savevm.c
>> index 1522d95..f10e031 100644
>> --- a/savevm.c
>> +++ b/savevm.c
>> @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags)
>>   
>>   void ram_control_load_hook(QEMUFile *f, uint64_t flags)
>>   {
>> -    int ret = 0;
>> +    int ret = -1;
> -EINVAL

OK, thanks.

>
> otherwise looks good thanks!
>
> Paolo
>
>>       if (f->ops->hook_ram_load) {
>>           ret = f->ops->hook_ram_load(f, f->opaque, flags);
>>
>
Paolo Bonzini Aug. 23, 2013, 5:34 a.m. UTC | #3
> On 08/21/2013 06:40 PM, Paolo Bonzini wrote:
> > Il 21/08/2013 09:18, Lei Li ha scritto:
> >> It should set negative error value if there has been an error.
> >>
> >> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
> >> ---
> >>   savevm.c |    2 +-
> >>   1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/savevm.c b/savevm.c
> >> index 1522d95..f10e031 100644
> >> --- a/savevm.c
> >> +++ b/savevm.c
> >> @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t
> >> flags)
> >>   
> >>   void ram_control_load_hook(QEMUFile *f, uint64_t flags)
> >>   {
> >> -    int ret = 0;
> >> +    int ret = -1;
> > -EINVAL
> 
> OK, thanks.

Can you extract the patches that I reviewed positively, plus this
one, and send them separately?

Thanks!

Paolo
Lei Li Aug. 23, 2013, 6:31 a.m. UTC | #4
On 08/23/2013 01:34 PM, Paolo Bonzini wrote:
>> On 08/21/2013 06:40 PM, Paolo Bonzini wrote:
>>> Il 21/08/2013 09:18, Lei Li ha scritto:
>>>> It should set negative error value if there has been an error.
>>>>
>>>> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
>>>> ---
>>>>    savevm.c |    2 +-
>>>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/savevm.c b/savevm.c
>>>> index 1522d95..f10e031 100644
>>>> --- a/savevm.c
>>>> +++ b/savevm.c
>>>> @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t
>>>> flags)
>>>>    
>>>>    void ram_control_load_hook(QEMUFile *f, uint64_t flags)
>>>>    {
>>>> -    int ret = 0;
>>>> +    int ret = -1;
>>> -EINVAL
>> OK, thanks.
> Can you extract the patches that I reviewed positively, plus this
> one, and send them separately?

Sure, I will send it later. :)

>
> Thanks!
>
> Paolo
>
diff mbox

Patch

diff --git a/savevm.c b/savevm.c
index 1522d95..f10e031 100644
--- a/savevm.c
+++ b/savevm.c
@@ -649,7 +649,7 @@  void ram_control_after_iterate(QEMUFile *f, uint64_t flags)
 
 void ram_control_load_hook(QEMUFile *f, uint64_t flags)
 {
-    int ret = 0;
+    int ret = -1;
 
     if (f->ops->hook_ram_load) {
         ret = f->ops->hook_ram_load(f, f->opaque, flags);