From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3xeu-0006C5-F8 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 22:00:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3xeq-0004hl-Dj for qemu-devel@nongnu.org; Tue, 01 Dec 2015 22:00:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3xeq-0004hY-8G for qemu-devel@nongnu.org; Tue, 01 Dec 2015 22:00:40 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2BAD7354182 for ; Wed, 2 Dec 2015 03:00:39 +0000 (UTC) Date: Wed, 2 Dec 2015 11:00:27 +0800 From: Peter Xu Message-ID: <20151202030026.GA19485@pxdev.xzpeter.org> References: <1448976530-15984-1-git-send-email-peterx@redhat.com> <1448976530-15984-4-git-send-email-peterx@redhat.com> <20151202004649.GB9399@ad.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151202004649.GB9399@ad.usersys.redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 03/11] dump-guest-memory: using static DumpState, add DumpStatus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: drjones@redhat.com, lersek@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, lcapitulino@redhat.com On Wed, Dec 02, 2015 at 08:46:49AM +0800, Fam Zheng wrote: > On Tue, 12/01 21:28, Peter Xu wrote: > > + if (*errp) { > > + s->status = DUMP_STATUS_FAILED; > > + } else { > > + s->status = DUMP_STATUS_COMPLETED; > > + } > > + > > To detect error, it's better to use local_err plus error_propagate like a few > lines above. errp _can_ be NULL depending on callers, though in practice qmp > functions should get a non-NULL. Yes, you are right. I will make sure all the error handlings in the patch set are using local error variables, and call error_propagate() afterward. Thanks. Peter > > Fam