Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li

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 li...@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




--
Lei




Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Lei Li

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 li...@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);






--
Lei




Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Paolo Bonzini
 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 li...@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



[Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-21 Thread Lei Li
It should set negative error value if there has been an error.

Signed-off-by: Lei Li li...@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;
 
 if (f-ops-hook_ram_load) {
 ret = f-ops-hook_ram_load(f, f-opaque, flags);
-- 
1.7.7.6




Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-21 Thread Paolo Bonzini
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 li...@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);