projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
282447b
)
tracing: Fix synthetic event to allow semicolon at end
author
Masami Hiramatsu
<
[email protected]
>
Thu, 18 Oct 2018 13:12:34 +0000
(22:12 +0900)
committer
Steven Rostedt (VMware)
<
[email protected]
>
Fri, 19 Oct 2018 21:25:11 +0000
(17:25 -0400)
Fix synthetic event to allow independent semicolon at end.
The synthetic_events interface accepts a semicolon after the
last word if there is no space.
# echo "myevent u64 var;" >> synthetic_events
But if there is a space, it returns an error.
# echo "myevent u64 var ;" > synthetic_events
sh: write error: Invalid argument
This behavior is difficult for users to understand. Let's
allow the last independent semicolon too.
Link:
http://lkml.kernel.org/r/153986835420.18251.2191216690677025744.stgit@devbox
Cc: Shuah Khan <
[email protected]
>
Cc: Tom Zanussi <
[email protected]
>
Cc:
[email protected]
Fixes: commit 4b147936fa50 ("tracing: Add support for 'synthetic' events")
Signed-off-by: Masami Hiramatsu <
[email protected]
>
Signed-off-by: Steven Rostedt (VMware) <
[email protected]
>
kernel/trace/trace_events_hist.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace_events_hist.c
b/kernel/trace/trace_events_hist.c
index 6ff83941065a07efa127004a4837e0dbb0c2c66c..d239004aaf29052eec50aaf61772c2b0de7c7947 100644
(file)
--- a/
kernel/trace/trace_events_hist.c
+++ b/
kernel/trace/trace_events_hist.c
@@
-1088,7
+1088,7
@@
static int create_synth_event(int argc, char **argv)
i += consumed - 1;
}
- if (i < argc) {
+ if (i < argc
&& strcmp(argv[i], ";") != 0
) {
ret = -EINVAL;
goto err;
}