diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-02-12 17:02:26 -0200 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:30 -0600 |
commit | 8f0173ad91560b45464b5fe167df44aab42bb657 (patch) | |
tree | 0e5a4d94428050b018591269fd655e30a90b9e07 /replay/replay.c | |
parent | 2cd7691fa5ec87e0da711de3e2ff28a9abe8bb27 (diff) | |
download | hqemu-8f0173ad91560b45464b5fe167df44aab42bb657.zip hqemu-8f0173ad91560b45464b5fe167df44aab42bb657.tar.gz |
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/replay.c')
-rw-r--r-- | replay/replay.c | 10 |
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) |