From 5af7b47284b63715e1599b07873ebeb5f9edb257 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 1 Jul 2025 21:16:58 -0400 Subject: kernel: console: Introduce cons_screen features Introduce a 'feat' field in the cons_screen structure to allow certain console features to be turned on or off. Signed-off-by: Ian Moffett --- sys/dev/cons/cons_ansi.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/dev/cons/cons_ansi.c') diff --git a/sys/dev/cons/cons_ansi.c b/sys/dev/cons/cons_ansi.c index fafb4ff..e00bdc9 100644 --- a/sys/dev/cons/cons_ansi.c +++ b/sys/dev/cons/cons_ansi.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -61,6 +62,8 @@ int ansi_feed(struct ansi_state *statep, char c) { struct cons_screen *scr = &g_root_scr; + struct console_feat *featp; + /* Standard colors */ static uint32_t colortab[] = { @@ -70,6 +73,11 @@ ansi_feed(struct ansi_state *statep, char c) ANSI_CYAN, ANSI_WHITE }; + featp = &scr->feat; + if (!featp->ansi_esc) { + return 0; + } + /* * Handle the control sequence introducer * bytes. -- cgit v1.2.3