tools lib traceevent: Changed return logic of tep_register_event_handler() API

In order to make libtraceevent into a proper library, its API
should be straightforward.

The tep_register_event_handler() functions returns -1 in case it
successfully registers the new event handler. Such return code is used
by the other library APIs in case of an error.

To unify the return logic of tep_register_event_handler() with the other
APIs, this patch introduces enum tep_reg_handler, which is used by this
function as return value, to handle all possible successful return

Signed-off-by: Tzvetomir Stoyanov <>
Cc: Andrew Morton <>
Cc: Jiri Olsa <>
Cc: Namhyung Kim <>
Signed-off-by: Steven Rostedt (VMware) <>
Signed-off-by: Arnaldo Carvalho de Melo <>
2 files changed