diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-01-16 21:14:15 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2024-01-25 12:18:04 -0500 |
commit | e53ab33dd68f67858e816508e796b5ba3892c8b0 (patch) | |
tree | 676070293b58f6b01863155324bc083be82692d2 | |
parent | f5b05d19752968d35ba3e6c1460ac8ff6101d1d2 (diff) | |
download | trace-cmd-e53ab33dd68f67858e816508e796b5ba3892c8b0.tar.gz |
libtracecmd: trace-cmd split: Do not fail if cmdlines are not present
If the input file that is being split does not contain a 'cmdline'
section, do not fail. The section is optional.
Link: https://lore.kernel.org/linux-trace-devel/20240116211415.41b530e5@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | lib/trace-cmd/trace-input.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index dae5b90d..ce4ecf43 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -5722,9 +5722,8 @@ int tracecmd_copy_headers(struct tracecmd_input *in_handle, if (end_state <= in_handle->file_state) return 0; - ret = copy_command_lines(in_handle, out_handle); - if (ret < 0) - goto out; + /* Optional */ + copy_command_lines(in_handle, out_handle); /* fallthrough */ case TRACECMD_FILE_CPU_COUNT: |