From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH] libtracefs: Change tracefs_tracers()to accept NULL pointer
Date: Thu, 17 Dec 2020 11:46:01 +0200 [thread overview]
Message-ID: <20201217094601.1401930-1-tz.stoyanov@gmail.com> (raw)
From: Tzvetomir (VMware) Stoyanov <tz.stoyanov@gmail.com>
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@gmail.com>
---
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
reply other threads:[~2020-12-17 9:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201217094601.1401930-1-tz.stoyanov@gmail.com \
--to=tz.stoyanov@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).