From: Lei Li <li...@linux.vnet.ibm.com> It should set negative error value rather than 0 in QEMUFile if there has been an error.
Reviewed-by: Michael R. Hines <mrhi...@us.ibm.com> Signed-off-by: Lei Li <li...@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quint...@redhat.com> --- savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.3.1