On Wed, 4 Aug 2010, Prerna Saxena wrote: > This patch adds an optional command line switch '-trace' to specify the > filename to write traces to, when qemu starts. > Eg, If compiled with the 'simple' trace backend, > [t...@system]$ qemu -trace FILENAME IMAGE > Allows the binary traces to be written to FILENAME instead of the option > set at config-time. > > Also, this adds monitor sub-command 'set' to trace-file commands to > dynamically change trace log file at runtime. > Eg, > (qemu)trace-file set FILENAME > This allows one to set trace outputs to FILENAME from the default > specified at startup. > > Changelog from v1 : > - Cleanups.
[..snip..] > + st_set_trace_file_enabled(false); > > - if (asprintf(&filename, CONFIG_TRACE_FILE, getpid()) < 0) { > - return false; > + free(trace_file_name); > + > + if (!file) { > + if (asprintf(&trace_file_name, CONFIG_TRACE_FILE, getpid()) < 0) { > + trace_file_name = NULL; > + return false; Tab here. > + } > + } else { > + if (asprintf(&trace_file_name, "%s", file) < 0) { > + trace_file_name = NULL; > + return false; > + } > } > [..snip..] -- mailto:av1...@comtv.ru