The trace-cmd restore has been broken for some time. This series fixes it. Steven Rostedt (VMware) (8): trace-cmd restore: Fix to add saved cmdlines after calling tracecmd_create_init_file_override() trace-cmd: Create API tracecmd_read_pre_headers() trace-cmd: Move tracecmd_write_cmdlines() out of tracecmd_append_cpu_data() trace-cmd: Move the output state updates into the functions that change the state trace-cmd: Move the input state updates into the functions that change the state trace-cmd output: Set file_state of output handle after copy of headers trace-cmd input: Validate the input handle when copying from it trace-cmd input: Add validation updates to the copy of a handle ---- lib/trace-cmd/include/private/trace-cmd-private.h | 1 + lib/trace-cmd/trace-input.c | 100 ++++++++++++++++---- lib/trace-cmd/trace-output.c | 109 ++++++++++++++-------- tracecmd/trace-record.c | 3 + tracecmd/trace-restore.c | 4 +- tracecmd/trace-split.c | 4 + 6 files changed, 164 insertions(+), 57 deletions(-)