From: Vincent Donnefort <vincent.donnefort@xxxxxxx> During the introduction of instance's output_file copy: 3a206ca ("trace-cmd: Have instances include a copy of its output file") The extract path has been omitted, leading to a broken output option: $ trace-cmd extract -o /foo/bar.dat # Will fallback to ./trace.dat Signed-off-by: Vincent Donnefort <vincent.donnefort@xxxxxxx> diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c index bd00457..72a5c8c 100644 --- a/tracecmd/trace-record.c +++ b/tracecmd/trace-record.c @@ -6622,6 +6622,9 @@ void trace_extract(int argc, char **argv) /* Save the state of tracing_on before starting */ for_all_instances(instance) { + instance->output_file = strdup(ctx.output); + if (!instance->output_file) + die("Failed to allocate output file name for instance"); if (!ctx.manual && instance->flags & BUFFER_FL_PROFILE) enable_profile(ctx.instance); -- 2.7.4