|
@@ -226,10 +226,15 @@ void trace_init_file(const char *file)
|
|
#ifdef CONFIG_TRACE_SIMPLE
|
|
#ifdef CONFIG_TRACE_SIMPLE
|
|
st_set_trace_file(file);
|
|
st_set_trace_file(file);
|
|
#elif defined CONFIG_TRACE_LOG
|
|
#elif defined CONFIG_TRACE_LOG
|
|
- /* If both the simple and the log backends are enabled, "--trace file"
|
|
|
|
- * only applies to the simple backend; use "-D" for the log backend.
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If both the simple and the log backends are enabled, "--trace file"
|
|
|
|
+ * only applies to the simple backend; use "-D" for the log
|
|
|
|
+ * backend. However we should only override -D if we actually have
|
|
|
|
+ * something to override it with.
|
|
*/
|
|
*/
|
|
- qemu_set_log_filename(file, &error_fatal);
|
|
|
|
|
|
+ if (file) {
|
|
|
|
+ qemu_set_log_filename(file, &error_fatal);
|
|
|
|
+ }
|
|
#else
|
|
#else
|
|
if (file) {
|
|
if (file) {
|
|
fprintf(stderr, "error: --trace file=...: "
|
|
fprintf(stderr, "error: --trace file=...: "
|