Received: from eggs.gnu.org ([2001:4830:134:3::10]:56513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VORL7-0003k6-Rs for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VORL1-0007cg-H7 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VORL1-0007cc-91 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:31 -0400 From: Juan Quintela Date: Tue, 24 Sep 2013 14:03:16 +0200 Message-Id: <1380024203-25897-3-git-send-email-quintela@redhat.com> In-Reply-To: <1380024203-25897-1-git-send-email-quintela@redhat.com> References: <1380024203-25897-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 2/9] savevm: fix wrong initialization by ram_control_load_hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Lei Li , anthony@codemonkey.ws From: Lei Li It should set negative error value rather than 0 in QEMUFile if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li Signed-off-by: Juan Quintela --- 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