From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> Now that the input and output handles know the state they are at in reading or writing, the tracecmd_copy() has to set the state of the output handle it creates. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- 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 6d504cbaf133..1156899a85d3 100644 --- a/lib/trace-cmd/trace-output.c +++ b/lib/trace-cmd/trace-output.c @@ -1656,6 +1656,8 @@ struct tracecmd_output *tracecmd_copy(struct tracecmd_input *ihandle, if (tracecmd_copy_headers(ihandle, handle->fd) < 0) goto out_free; + handle->file_state = TRACECMD_FILE_CMD_LINES; + /* The file is all ready to have cpu data attached */ return handle; -- 2.30.0