From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX4mO-0007PW-LC for qemu-devel@nongnu.org; Mon, 07 Apr 2014 04:19:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX4mI-00016T-Fo for qemu-devel@nongnu.org; Mon, 07 Apr 2014 04:19:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX4mI-00016H-8I for qemu-devel@nongnu.org; Mon, 07 Apr 2014 04:19:38 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s378JbMq023651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Apr 2014 04:19:37 -0400 Date: Mon, 7 Apr 2014 09:19:33 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20140407081933.GB2400@work-vm> References: <1396840915-10384-1-git-send-email-quintela@redhat.com> <1396840915-10384-4-git-send-email-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1396840915-10384-4-git-send-email-quintela@redhat.com> Subject: Re: [Qemu-devel] [PATCH 03/97] vmstate: return error in case of error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org * Juan Quintela (quintela@redhat.com) wrote: > If there is an error while loading a field, we should stop reading and > not continue with the rest of fields. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > vmstate.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/vmstate.c b/vmstate.c > index bfa34cc..d82cccf 100644 > --- a/vmstate.c > +++ b/vmstate.c > @@ -74,6 +74,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, > ret = field->info->get(f, addr, size); > > } > + if (ret >= 0) { > + ret = qemu_file_get_error(f); > + } > if (ret < 0) { > trace_vmstate_load_field_error(field->name, ret); > return ret; > -- > 1.9.0 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK