ftrace: Change filter/notrace set functions to return exit code
authorJiri Olsa <jolsa@redhat.com>
Mon, 2 Jan 2012 09:04:14 +0000 (10:04 +0100)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 3 Feb 2012 14:48:18 +0000 (09:48 -0500)
commitac483c446b67870444c9eeaf8325d3d2af9b91bc
treee2765af4acf86ce986856b2963036138ae077d58
parent623ec991ce0e8cd5791bad656c162fa837635907
ftrace: Change filter/notrace set functions to return exit code

Currently the ftrace_set_filter and ftrace_set_notrace functions
do not return any return code. So there's no way for ftrace_ops
user to tell wether the filter was correctly applied.

The set_ftrace_filter interface returns error in case the filter
did not match:

  # echo krava > set_ftrace_filter
  bash: echo: write error: Invalid argument

Changing both ftrace_set_filter and ftrace_set_notrace functions
to return zero if the filter was applied correctly or -E* values
in case of error.

Link: http://lkml.kernel.org/r/1325495060-6402-2-git-send-email-jolsa@redhat.com

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/ftrace.c