]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Return -ENOENT if there is no target synthetic event
authorMasami Hiramatsu <mhiramat@kernel.org>
Sun, 21 Oct 2018 15:08:20 +0000 (00:08 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 28 Oct 2018 08:58:15 +0000 (04:58 -0400)
commit57d283bb3c364dbbe24798025bbe663715e7f38f
tree12f44dd2fc90a9bbdf54c6927245bdf8eb65414a
parenta91534a3c0473b32e69eb10a05cf8f1fbab09de3
tracing: Return -ENOENT if there is no target synthetic event

Return -ENOENT error if there is no target synthetic event.
This notices an operation failure to user as below;

  # echo 'wakeup_latency u64 lat; pid_t pid;' > synthetic_events
  # echo '!wakeup' >> synthetic_events
  sh: write error: No such file or directory

Link: http://lkml.kernel.org/r/154013449986.25576.9487131386597290172.stgit@devbox
Acked-by: Tom Zanussi <zanussi@linux.intel.com>
Tested-by: Tom Zanussi <zanussi@linux.intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Rajvi Jingar <rajvi.jingar@intel.com>
Cc: stable@vger.kernel.org
Fixes: 00a1b9a7a86b ('tracing: Add support for 'synthetic' events')
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c