diff mbox series

trace-cmd split: Do not fail if cmdlines are not present

Message ID 20240116211415.41b530e5@gandalf.local.home (mailing list archive)
State Accepted
Commit e53ab33dd68f67858e816508e796b5ba3892c8b0
Headers show
Series trace-cmd split: Do not fail if cmdlines are not present | expand

Commit Message

Steven Rostedt Jan. 17, 2024, 2:14 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

If the input file that is being split does not contain a 'cmdline'
section, do not fail. The section is optional.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 lib/trace-cmd/trace-input.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index dae5b90d7da9..ce4ecf43de74 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: