From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDt8b-0002qX-Kw for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:31:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDt8S-0003dv-Hv for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:31:05 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:43032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDt8R-0003db-Ve for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:30:56 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Aug 2013 19:22:17 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 9AD732CE804D for ; Mon, 26 Aug 2013 19:30:47 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7Q9EhKx6947162 for ; Mon, 26 Aug 2013 19:14:44 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7Q9Ukbo020601 for ; Mon, 26 Aug 2013 19:30:46 +1000 From: Lei Li Date: Mon, 26 Aug 2013 17:29:27 +0800 Message-Id: <1377509368-24921-2-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1377509368-24921-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1377509368-24921-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/3 v2] savevm: fix wrong error set by ram_control_load_hook() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, anthony@codemonkey.ws, mrhines@linux.vnet.ibm.com, Lei Li It should set negative error value if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li --- 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