aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2016-02-12 17:02:26 -0200
committerMarkus Armbruster <armbru@redhat.com>2016-02-19 13:46:44 +0100
commit890ad5508e0e450272faa4b38611b9df5bab871a (patch)
treeaa9ec896080581875378c663bd6bd09db07e8725 /replay
parent43fa1e0bd98887fb5ead745de13dc9961799e97e (diff)
downloadqemu-890ad5508e0e450272faa4b38611b9df5bab871a.zip
qemu-890ad5508e0e450272faa4b38611b9df5bab871a.tar.gz
qemu-890ad5508e0e450272faa4b38611b9df5bab871a.tar.bz2
replay: Set error location properly when parsing options
Set error location so the error_report() calls will show appropriate command-line argument or config file info. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1455303747-19776-4-git-send-email-ehabkost@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'replay')
-rw-r--r--replay/replay.c10
1 files changed, 10 insertions, 0 deletions
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)