]> git.proxmox.com Git - mirror_qemu.git/commitdiff
replay: Set error location properly when parsing options
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 12 Feb 2016 19:02:26 +0000 (17:02 -0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 19 Feb 2016 12:46:44 +0000 (13:46 +0100)
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>
replay/replay.c

index 9cac178697eb7ddc315b3c4d02eb02f3b385b48d..f8739c26c8a79bdefb1d7905d5a186352a590642 100644 (file)
@@ -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)