@@ -294,6 +294,21 @@ QemuOptsList qemu_mon_opts = {
},
};
+#ifdef CONFIG_SIMPLE_TRACE
+QemuOptsList qemu_trace_opts = {
+ .name = "trace",
+ .implied_opt_name = "trace",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_trace_opts.head),
+ .desc = {
+ {
+ .name = "file",
+ .type = QEMU_OPT_STRING,
+ },
+ { /* end if list */ }
+ },
+};
+#endif
+
QemuOptsList qemu_cpudef_opts = {
.name = "cpudef",
.head = QTAILQ_HEAD_INITIALIZER(qemu_cpudef_opts.head),
@@ -352,6 +367,9 @@ static QemuOptsList *vm_config_groups[] = {
&qemu_global_opts,
&qemu_mon_opts,
&qemu_cpudef_opts,
+#ifdef CONFIG_SIMPLE_TRACE
+ &qemu_trace_opts,
+#endif
NULL,
};
@@ -14,6 +14,9 @@ extern QemuOptsList qemu_rtc_opts;
extern QemuOptsList qemu_global_opts;
extern QemuOptsList qemu_mon_opts;
extern QemuOptsList qemu_cpudef_opts;
+#ifdef CONFIG_SIMPLE_TRACE
+extern QemuOptsList qemu_trace_opts;
+#endif
QemuOptsList *qemu_find_opts(const char *group);
int qemu_set_option(const char *str);
@@ -2599,7 +2599,10 @@ int main(int argc, char **argv, char **envp)
break;
#ifdef CONFIG_SIMPLE_TRACE
case QEMU_OPTION_trace:
- trace_file = optarg;
+ opts = qemu_opts_parse(&qemu_trace_opts, optarg, 0);
+ if (opts) {
+ trace_file = qemu_opt_get(opts, "file");
+ }
break;
#endif
case QEMU_OPTION_readconfig:
[PATCH] Add -trace file FILENAME switch to qemu startup command. This processes the argument using QemuOptsList Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> --- qemu-config.c | 18 ++++++++++++++++++ qemu-config.h | 3 +++ vl.c | 5 ++++- 3 files changed, 25 insertions(+), 1 deletions(-)