[PATCH 2/4] libtracefs: Fix tracefs_synth_echo_cmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

The update to use dynamic_events instead of synthetic_events for echoing
the synthetic event missed out on adding the colon, and made the output
incorrect for the new format.

Fixes: d7c5dbb7a231e ("libtracefs: Use the internal dynamic events API when creating synthetic events")
Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
---
 src/tracefs-hist.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c
index 8d99492c84a7..622fe5c98c41 100644
--- a/src/tracefs-hist.c
+++ b/src/tracefs-hist.c
@@ -2155,8 +2155,10 @@ int tracefs_synth_echo_cmd(struct trace_seq *seq,
 	if (!path)
 		goto out_free;
 
-	trace_seq_printf(seq, "echo '%s%s %s' > %s/%s\n",
-			 synth->dyn_event->prefix, synth->dyn_event->event,
+	trace_seq_printf(seq, "echo '%s%s%s %s' > %s/%s\n",
+			 synth->dyn_event->prefix,
+			 strlen(synth->dyn_event->prefix) ? ":" : "",
+			 synth->dyn_event->event,
 			 synth->dyn_event->format, path, synth->dyn_event->trace_file);
 
 	tracefs_put_tracing_file(path);
-- 
2.33.0




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux