[PATCH 1/1] cli: always show cursor

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Mar 29 17:09:22 CET 2024


We may enter the command line interface in a state where on the remote
console the cursor is not shown. Send an escape sequence to enable it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 common/cli.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/cli.c b/common/cli.c
index a34938294ec..1c33daf1149 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -11,6 +11,7 @@
 #define pr_fmt(fmt) "cli: %s: " fmt, __func__
 
 #include <common.h>
+#include <ansi.h>
 #include <bootstage.h>
 #include <cli.h>
 #include <cli_hush.h>
@@ -336,4 +337,7 @@ void cli_init(void)
 #if defined(CONFIG_HUSH_INIT_VAR)
 	hush_init_var();
 #endif
+
+	if (CONFIG_IS_ENABLED(VIDEO_ANSI))
+		printf(ANSI_CURSOR_SHOW "\n");
 }
-- 
2.43.0



More information about the U-Boot mailing list