rtla: use the definition for stdout fd when calling isatty()
Subsystems (2)
PATCH 1/1 rtla: use the definition for stdout fd when calling isatty()
Use the STDOUT_FILENO definition when testing whether the standard output file descriptor refers to a terminal (for better redability).
Signed-off-by Eder Zulian <[email protected]>
--- tools/tracing/rtla/src/osnoise_top.c | 2 +- tools/tracing/rtla/src/timerlat_top.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/tracing/rtla/src/osnoise_top.c +1 -1
@@ -627,7 +627,7 @@ osnoise_top_apply_config(struct osnoise_tool *tool, struct osnoise_top_params *pauto_house_keeping (¶ms->monitored_cpus); } -if (isatty (1 ) && !params->quiet) +if (isatty (STDOUT_FILENO ) && !params->quiet) params->pretty_output =1 ;return 0 ;
tools/tracing/rtla/src/timerlat_top.c +1 -1
@@ -850,7 +850,7 @@ timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params * } } -if (isatty (1 ) && !params->quiet) +if (isatty (STDOUT_FILENO ) && !params->quiet) params->pretty_output =1 ;return 0 ;
Signature · 1 line
2.46.0