[PATCH 2/3] trace2: trim whitespace in start message in perf target format
From: Jeff Hostetler via GitGitGadget <hidden>
Date: 2019-07-31 20:04:41
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Jeff Hostetler via GitGitGadget <hidden>
Date: 2019-07-31 20:04:41
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Jeff Hostetler <redacted> Trim leading/trailing whitespace from the command line printed in the "start" message in the perf target format. We use `sq_quote_argv_pretty()` to format the message and it adds a leading space to the output. Trim that. Signed-off-by: Jeff Hostetler <redacted> --- trace2/tr2_tgt_perf.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/trace2/tr2_tgt_perf.c b/trace2/tr2_tgt_perf.c
index 4a9d99218b..ed4e708f28 100644
--- a/trace2/tr2_tgt_perf.c
+++ b/trace2/tr2_tgt_perf.c@@ -185,6 +185,7 @@ static void fn_start_fl(const char *file, int line, struct strbuf buf_payload = STRBUF_INIT; sq_quote_argv_pretty(&buf_payload, argv); + strbuf_trim(&buf_payload); perf_io_write_fl(file, line, event_name, NULL, &us_elapsed_absolute, NULL, NULL, &buf_payload);
--
gitgitgadget