[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/5] replay: Set error location properly when parsing
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 3/5] replay: Set error location properly when parsing options |
Date: |
Fri, 19 Feb 2016 14:27:47 +0100 |
From: Eduardo Habkost <address@hidden>
Set error location so the error_report() calls will show
appropriate command-line argument or config file info.
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
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)
--
2.4.3
- [Qemu-devel] [PULL 0/5] Error reporting patches for 2016-02-19, Markus Armbruster, 2016/02/19
- [Qemu-devel] [PULL 5/5] vl: Clean up machine selection in main()., Markus Armbruster, 2016/02/19
- [Qemu-devel] [PULL 4/5] vl: Set error location when parsing memory options, Markus Armbruster, 2016/02/19
- [Qemu-devel] [PULL 2/5] vl: Reset location after handling command-line arguments, Markus Armbruster, 2016/02/19
- [Qemu-devel] [PULL 3/5] replay: Set error location properly when parsing options,
Markus Armbruster <=
- [Qemu-devel] [PULL 1/5] vl.c: Fix regression in machine error message, Markus Armbruster, 2016/02/19
- Re: [Qemu-devel] [PULL 0/5] Error reporting patches for 2016-02-19, Peter Maydell, 2016/02/19