aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorLei Li <lilei@linux.vnet.ibm.com>2013-09-04 17:02:35 +0800
committerJuan Quintela <quintela@trasno.org>2013-09-24 13:22:08 +0200
commitc77a5f2daa1ccbd825d59b95c70207c0a196bb94 (patch)
tree43081ebf9d60eff76ee85a740a4d91b0d2f8ead6 /savevm.c
parent675fd0a7daa484a2011895583249c88ef2a27921 (diff)
downloadqemu-c77a5f2daa1ccbd825d59b95c70207c0a196bb94.zip
qemu-c77a5f2daa1ccbd825d59b95c70207c0a196bb94.tar.gz
qemu-c77a5f2daa1ccbd825d59b95c70207c0a196bb94.tar.bz2
savevm: fix wrong initialization by ram_control_load_hook
It should set negative error value rather than 0 in QEMUFile if there has been an error. Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index a834c6f..2f631d4 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);