[lkml]   [2019]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 10/15] tools/lib/traceevent: Remove call to exit() from tep_filter_add_filter_str()
From: Tzvetomir Stoyanov <>

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.


Signed-off-by: Tzvetomir Stoyanov <>
Signed-off-by: Steven Rostedt (VMware) <>
tools/lib/traceevent/parse-filter.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c
index 4ffd8b25a852..3320c0a0e343 100644
--- a/tools/lib/traceevent/parse-filter.c
+++ b/tools/lib/traceevent/parse-filter.c
@@ -1346,9 +1346,6 @@ enum tep_errno tep_filter_add_filter_str(struct tep_event_filter *filter,


- if (rtn >= 0 && pevent->test_filters)
- exit(0);
return rtn;


 \ /
  Last update: 2019-04-01 18:44    [W:0.321 / U:3.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site