trace-cmd: Let subcommand "convert" automatically if possible.
PATCH 1/1 trace-cmd: Let subcommand "convert" automatically if possible.
Let the convert subcommand compress automatically if the file format allows it and the user did not specify it.
This already the case the record command.
Signed-off-by Sebastian Andrzej Siewior <[email protected]
--- Documentation/trace-cmd/trace-cmd-convert.1.txt | 3 ++- tracecmd/trace-convert.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
Documentation/trace-cmd/trace-cmd-convert.1.txt +2 -1
@@ -13,7 +13,8 @@ DESCRIPTION ----------- The trace-cmd(1) convert command converts trace file. It reads the input file and copies the data into an output file. The output file may be in different format, depending on the command line -arguments. +arguments. The default output is in version 7 and compressed (if +compiled with compression support). OPTIONS -------
tracecmd/trace-convert.c +2 -0
@@ -104,6 +104,8 @@ void trace_convert(int argc, char **argv) input_file =DEFAULT_INPUT_FILE ;if (!output_file)usage (argv); +if (file_version >=FILE_VERSION_COMPRESSION && !compression) + compression ="any" ;convert_file (input_file, output_file, file_version, compression); }
Signature · 1 line
2.38.1
Steven Rostedt
AppliedQuoted 5 lines · On Sat, 10 Dec 2022 21:36:58 +0100 Sebastian Andrzej Siewior…
Let the convert subcommand compress automatically if the file format allows it and the user did not specify it.
This already the case the record command.Signed-off-by Sebastian Andrzej Siewior <[email protected]
Oops, broken email, I'll fix.
Applied, thanks Sebastian!
-- Steve