From: Tzvetomir (VMware) Stoyanov <tz.stoyanov@xxxxxxxxx> 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) <tz.stoyanov@xxxxxxxxx> --- src/tracefs-events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tracefs-events.c b/src/tracefs-events.c index 8cdec8e..58fa153 100644 --- a/src/tracefs-events.c +++ b/src/tracefs-events.c @@ -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; -- 2.28.0