When a new trace file output handler is allocated, based on given trace file input handler - use the same compression algorithm. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- lib/trace-cmd/trace-output.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c index 9d603cfe..75cf143d 100644 --- a/lib/trace-cmd/trace-output.c +++ b/lib/trace-cmd/trace-output.c @@ -1026,6 +1026,7 @@ static int select_file_version(struct tracecmd_output *handle, struct tracecmd_i { if (ihandle) { handle->file_version = tracecmd_get_file_version(ihandle); + handle->compress_proto = tracecmd_get_file_comperssion(ihandle); } else if (file_version > 0) { handle->file_version = file_version; } else { @@ -1769,6 +1770,7 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd) tep_ref(handle->pevent); handle->page_size = tracecmd_page_size(ihandle); handle->file_version = tracecmd_get_file_version(ihandle); + handle->compress_proto = tracecmd_get_file_comperssion(ihandle); list_head_init(&handle->options); tracecmd_close(ihandle); -- 2.30.2