libtracefs: Change tracefs_tracers()to accept NULL pointer
PATCH 1/1 libtracefs: Change tracefs_tracers()to accept NULL pointer
From: Tzvetomir (VMware) Stoyanov <[email protected]>
In order to be consistent with the other libtracefs APIs, the
char **tracefs_tracers(const char *tracing_dir);
function is changed to accept NULL pointer as valid input argument. If NULL is passed, the tracers of the top instance are returned.
Signed-off-by Tzvetomir Stoyanov (VMware) <[email protected]>
--- src/tracefs-events.c | 3 +++ 1 file changed, 3 insertions(+)
src/tracefs-events.c +3 -0
@@ -406,6 +406,9 @@ char **tracefs_tracers(const char *tracing_dir)int len;int ret; +if (!tracing_dir) + tracing_dir =tracefs_get_tracing_dir (); +if (!tracing_dir)return NULL ;
Signature · 1 line
2.28.0