trace-cmd split: Do not append '.1' to single file if output specified
PATCH 1/1 trace-cmd split: Do not append '.1' to single file if output specified
From: "Steven Rostedt (Google)" <[email protected]>
If the user specifies an output file, and it is not the same as the input file, and the '-r' (repeat) option is not specified, there's no reason to append the '.1' to the output file name. Just use what the user specified.
Suggested-by Sharon Gabay <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- tracecmd/trace-split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tracecmd/trace-split.c +1 -1
@@ -545,7 +545,7 @@ void trace_split (int argc, char **argv)if (!output) output =strdup (input_file); -if (!repeat) { +if (!repeat &&strcmp (output, input_file) ==0 ) { output =realloc (output,strlen (output) +3 );strcat (output,".1" ); }
Signature · 1 line
2.39.2