trace-cmd record/set: Use write() instead of fwrite() for options
For some reason, using fwrite() to write to trace_options does not return
the error messages. When using -O userstacktrace_delay on a system that did
not have it supported, the fwrite() succeeds and the user of trace-cmd
things the option is set. This is confusing when looking at the output and
not seeing the delayed stack traces.
Switch fopen()/fwrite() over to open()/write() where there's no dependency
on glibc getting it correct.
Link: https://lore.kernel.org/20250826105223.4b857921@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed