From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] libtracefs: Add new API for open trace marker file
Date: Tue, 23 Feb 2021 17:22:14 -0500 [thread overview]
Message-ID: <20210223172214.03b05e3c@gandalf.local.home> (raw)
In-Reply-To: <20210219055353.2244340-1-tz.stoyanov@gmail.com>
On Fri, 19 Feb 2021 07:53:53 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> +/**
> + * tracefs_trace_marker_get_fd - Get a file descriptor of "trace_marker" in
> + * given instance
> + * @instance: ftrace instance, can be NULL for the top instance
> + *
> + * Returns -1 in case of an error, or a valid file descriptor to "trace_marker"
> + * file for reading and writing. The returned FD must be closed with close().
> + */
> +static inline int tracefs_trace_marker_get_fd(struct tracefs_instance *instance)
> +{
> + return tracefs_instance_file_open(instance, "trace_marker", O_RDWR);
And this should be opened with "O_WRONLY", as trace_marker can't be read.
-- Steve
> +}
> +
prev parent reply other threads:[~2021-02-23 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 5:53 [PATCH] libtracefs: Add new API for open trace marker file Tzvetomir Stoyanov (VMware)
2021-02-19 14:26 ` Steven Rostedt
2021-02-19 14:42 ` Steven Rostedt
2021-02-24 5:35 ` Tzvetomir Stoyanov
2021-02-25 1:24 ` Steven Rostedt
2021-02-23 22:22 ` Steven Rostedt [this message]
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=20210223172214.03b05e3c@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.com \
/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).