docs: ftrace: Correct access mode
Subsystems (3)
PATCH 1/1 docs: ftrace: Correct access mode
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 <[email protected]>
--- Documentation/trace/ftrace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/trace/ftrace.rst +1 -1
@@ -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
Signature · 1 line
2.34.1
Quoted 15 lines · On Sat, 8 Oct 2022 08:32:50 +0000 Leo Yan <[email protected]> wrote:
The documentation gives an example for opening trace marker with write-only mode, but the flag
WR_ONLYis not defined by glibc.Use
O_WRONLYto replace it.Signed-off-by Leo Yan <[email protected]>--- Documentation/trace/ftrace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/trace/ftrace.rst +0
-0
Documentation/trace/ftrace.rst of ftrace. Here is a list of some of the key files: · line 567
Quoted 5 lines
Documentation/trace/ftrace.rst +1
-1@@ -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);
-- Steve
Quoted 3 lines
Documentation/trace/ftrace.rst +0
-0Note: Writing into the trace_marker file can also initiate triggers that are written into /sys/kernel/tracing/events/ftrace/print/trigger
Quoted 15 lines · Leo Yan
The documentation gives an example for opening trace marker with write-only mode, but the flag
WR_ONLYis not defined by glibc.Use
O_WRONLYto replace it.Signed-off-by Leo Yan <[email protected]>--- Documentation/trace/ftrace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/trace/ftrace.rst +0
-0
Documentation/trace/ftrace.rst of ftrace. Here is a list of some of the key files: · line 568
Quoted 6 lines
Documentation/trace/ftrace.rst +1
-1@@ -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