
From: Simon Glass <sjg@chromium.org> Detect if there is no terminal present (this only works on sandbox) and skip sending ANSI characters when the CLI starts up. This avoids having them in logs, for example. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) common/cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/cli.c b/common/cli.c index 4694a35cd0e..23988330dd8 100644 --- a/common/cli.c +++ b/common/cli.c @@ -20,6 +20,7 @@ #include <fdtdec.h> #include <hang.h> #include <malloc.h> +#include <serial.h> #include <asm/global_data.h> #include <dm/ofnode.h> #include <linux/errno.h> @@ -337,6 +338,6 @@ void cli_init(void) hush_init_var(); #endif - if (CONFIG_IS_ENABLED(VIDEO_ANSI)) + if (CONFIG_IS_ENABLED(VIDEO_ANSI) && serial_is_tty()) printf(ANSI_CURSOR_SHOW "\n"); } -- 2.43.0