aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTzvetomir Stoyanov <tstoyanov@vmware.com>2019-04-08 18:23:35 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-04-08 12:35:16 -0400
commitff13b789a7478a2ea7bce67f6ddcc6bc8ad8359a (patch)
treef23a9eacc98fda231000be578c37c414d5ed63cd
parentbc2aa07c34cba9557d8fb0375424b2251e2aab5e (diff)
downloadtrace-cmd-ff13b789a7478a2ea7bce67f6ddcc6bc8ad8359a.tar.gz
tools lib traceevent: Remove call to exit() from tep_filter_add_filter_str()
This patch removes call to exit() from tep_filter_add_filter_str(). A library function should not force the application to exit. In the current implementation tep_filter_add_filter_str() calls exit() when a special "test_filters" mode is set, used only for debugging purposes. When this mode is set and a filter is added - its string is printed to the console and exit() is called. This patch changes the logic - when in "test_filters" mode, the filter string is still printed, but the exit() is not called. It is up to the application to track when "test_filters" mode is set and to call exit, if needed. Link: http://lore.kernel.org/linux-trace-devel/20190408152340.12450-6-tstoyanov@vmware.com Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20190326154328.28718-9-tstoyanov@vmware.com Link: http://lkml.kernel.org/r/20190401164344.121717482@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--lib/traceevent/parse-filter.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/traceevent/parse-filter.c b/lib/traceevent/parse-filter.c
index 4ffd8b25..3320c0a0 100644
--- a/lib/traceevent/parse-filter.c
+++ b/lib/traceevent/parse-filter.c
@@ -1346,9 +1346,6 @@ enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter,
free_events(events);
- if (rtn >= 0 && pevent->test_filters)
- exit(0);
-
return rtn;
}