From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUJUd-0002bz-R6 for qemu-devel@nongnu.org; Fri, 12 Feb 2016 14:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUJUY-0000rG-Q2 for qemu-devel@nongnu.org; Fri, 12 Feb 2016 14:35:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUJUY-0000qw-Bn for qemu-devel@nongnu.org; Fri, 12 Feb 2016 14:34:58 -0500 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 (Postfix) with ESMTPS id 0969C19F96F for ; Fri, 12 Feb 2016 19:34:58 +0000 (UTC) References: <1455303747-19776-1-git-send-email-ehabkost@redhat.com> <1455303747-19776-4-git-send-email-ehabkost@redhat.com> From: Marcel Apfelbaum Message-ID: <56BE33DD.4070807@redhat.com> Date: Fri, 12 Feb 2016 21:34:53 +0200 MIME-Version: 1.0 In-Reply-To: <1455303747-19776-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/4] replay: Set error location properly when parsing options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Paolo Bonzini , lersek@redhat.com, armbru@redhat.com On 02/12/2016 09:02 PM, Eduardo Habkost wrote: > Set error location so the error_report() calls will show > appropriate command-line argument or config file info. > > Signed-off-by: Eduardo Habkost > --- > replay/replay.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/replay/replay.c b/replay/replay.c > index 9cac178..f8739c2 100644 > --- a/replay/replay.c > +++ b/replay/replay.c > @@ -262,6 +262,14 @@ void replay_configure(QemuOpts *opts) > const char *fname; > const char *rr; > ReplayMode mode = REPLAY_MODE_NONE; > + Location loc; > + > + if (!opts) { > + return; > + } > + > + loc_push_none(&loc); > + qemu_opts_loc_restore(opts); > > rr = qemu_opt_get(opts, "rr"); > if (!rr) { > @@ -283,6 +291,8 @@ void replay_configure(QemuOpts *opts) > } > > replay_enable(fname, mode); > + > + loc_pop(&loc); > } > > void replay_start(void) > Reviewed-by: Marcel Apfelbaum Thanks, Marcel