docs: ftrace: Correct access mode
authorLeo Yan <leo.yan@linaro.org>
Sat, 8 Oct 2022 08:32:50 +0000 (08:32 +0000)
committerJonathan Corbet <corbet@lwn.net>
Mon, 10 Oct 2022 18:50:53 +0000 (12:50 -0600)
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>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20221008083250.3160-1-leo.yan@linaro.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/trace/ftrace.rst

index b37dc19e4d40950fb46d9016cb99f4b905271580..60bceb018d6a9372cd57aaee4e16e54dc6595e10 100644 (file)
@@ -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