linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: ftrace: Correct access mode
@ 2022-10-08  8:32 Leo Yan
  2022-10-08 20:19 ` Steven Rostedt
  2022-10-10 18:51 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Leo Yan @ 2022-10-08  8:32 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Jonathan Corbet, linux-doc, linux-kernel
  Cc: Leo Yan

The documentation gives an example for opening trace marker with
write-only mode, but the flag WR_ONLY is not defined by glibc.

Use O_WRONLY to replace it.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 Documentation/trace/ftrace.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index b37dc19e4d40..60bceb018d6a 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -564,7 +564,7 @@ of ftrace. Here is a list of some of the key files:
 
 	start::
 
-		trace_fd = open("trace_marker", WR_ONLY);
+		trace_fd = open("trace_marker", O_WRONLY);
 
 	Note: Writing into the trace_marker file can also initiate triggers
 	      that are written into /sys/kernel/tracing/events/ftrace/print/trigger
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: ftrace: Correct access mode
  2022-10-08  8:32 [PATCH] docs: ftrace: Correct access mode Leo Yan
@ 2022-10-08 20:19 ` Steven Rostedt
  2022-10-10 18:51 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-10-08 20:19 UTC (permalink / raw)
  To: Leo Yan; +Cc: Ingo Molnar, Jonathan Corbet, linux-doc, linux-kernel

On Sat,  8 Oct 2022 08:32:50 +0000
Leo Yan <leo.yan@linaro.org> wrote:

> The documentation gives an example for opening trace marker with
> write-only mode, but the flag WR_ONLY is not defined by glibc.
> 
> Use O_WRONLY to replace it.
> 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  Documentation/trace/ftrace.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
> index b37dc19e4d40..60bceb018d6a 100644
> --- a/Documentation/trace/ftrace.rst
> +++ b/Documentation/trace/ftrace.rst
> @@ -564,7 +564,7 @@ of ftrace. Here is a list of some of the key files:
>  
>  	start::
>  
> -		trace_fd = open("trace_marker", WR_ONLY);
> +		trace_fd = open("trace_marker", O_WRONLY);

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

>  
>  	Note: Writing into the trace_marker file can also initiate triggers
>  	      that are written into /sys/kernel/tracing/events/ftrace/print/trigger


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: ftrace: Correct access mode
  2022-10-08  8:32 [PATCH] docs: ftrace: Correct access mode Leo Yan
  2022-10-08 20:19 ` Steven Rostedt
@ 2022-10-10 18:51 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2022-10-10 18:51 UTC (permalink / raw)
  To: Leo Yan, Steven Rostedt, Ingo Molnar, linux-doc, linux-kernel; +Cc: Leo Yan

Leo Yan <leo.yan@linaro.org> writes:

> The documentation gives an example for opening trace marker with
> write-only mode, but the flag WR_ONLY is not defined by glibc.
>
> Use O_WRONLY to replace it.
>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  Documentation/trace/ftrace.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
> index b37dc19e4d40..60bceb018d6a 100644
> --- a/Documentation/trace/ftrace.rst
> +++ b/Documentation/trace/ftrace.rst
> @@ -564,7 +564,7 @@ of ftrace. Here is a list of some of the key files:
>  
>  	start::
>  
> -		trace_fd = open("trace_marker", WR_ONLY);
> +		trace_fd = open("trace_marker", O_WRONLY);
>  

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-10 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-08  8:32 [PATCH] docs: ftrace: Correct access mode Leo Yan
2022-10-08 20:19 ` Steven Rostedt
2022-10-10 18:51 ` Jonathan Corbet

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).