qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/3 resend v2] savevm: fix wrong initialization by r


From: Lei Li
Subject: [Qemu-devel] [PATCH 2/3 resend v2] savevm: fix wrong initialization by ram_control_load_hook
Date: Wed, 4 Sep 2013 17:02:35 +0800

It should set negative error value rather than 0 in QEMUFile
if there has been an error.

Reviewed-by: Michael R. Hines <address@hidden>
Signed-off-by: Lei Li <address@hidden>
---

Change since v1:
  Initialize ret to -EINVAL rather than -1 from Paolo Bonzini.

 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/savevm.c b/savevm.c
index 95a11f9..a0be109 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 = -EINVAL;
 
     if (f->ops->hook_ram_load) {
         ret = f->ops->hook_ram_load(f, f->opaque, flags);
-- 
1.7.7.6




reply via email to

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