[PATCH v7 1/4] tracing: eprobe: add missing log index
From: Linyu Yuan
Date: Sun Jun 26 2022 - 22:19:26 EST
Add trace_probe_log_set_index(1) to allow report correct error
if user input wrong SYSTEM.EVENT format.
Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx>
---
v7: move one line change from v6 to a separate patch
kernel/trace/trace_eprobe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c
index 7d44785..b805b57 100644
--- a/kernel/trace/trace_eprobe.c
+++ b/kernel/trace/trace_eprobe.c
@@ -881,6 +881,7 @@ static int __trace_eprobe_create(int argc, const char *argv[])
if (!is_good_name(event) || !is_good_name(group))
goto parse_error;
+ trace_probe_log_set_index(1);
sys_event = argv[1];
ret = traceprobe_parse_event_name(&sys_event, &sys_name, buf2,
sys_event - argv[1]);
--
2.7.4