summaryrefslogtreecommitdiffstats
path: root/src/core/lineconsole.c
diff options
context:
space:
mode:
authorMichael Brown2012-03-26 22:03:59 +0200
committerMichael Brown2012-03-26 22:58:50 +0200
commitc2875ae32952690e11fc6f654fa48f4f2c9f0567 (patch)
treefca03fb4effcb19498caa8729ad782065cd633bb /src/core/lineconsole.c
parent[console] Add "log message" console usage and an internal syslog() call (diff)
downloadipxe-c2875ae32952690e11fc6f654fa48f4f2c9f0567.tar.gz
ipxe-c2875ae32952690e11fc6f654fa48f4f2c9f0567.tar.xz
ipxe-c2875ae32952690e11fc6f654fa48f4f2c9f0567.zip
[console] Do not share ANSI escape context between lineconsole users
An ANSI escape sequence context cannot be shared between multiple users. Make the ANSI escape sequence context part of the line console definition and provide individual contexts for each user. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/lineconsole.c')
-rw-r--r--src/core/lineconsole.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/core/lineconsole.c b/src/core/lineconsole.c
index c43a2875..71bc1f8b 100644
--- a/src/core/lineconsole.c
+++ b/src/core/lineconsole.c
@@ -29,16 +29,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/ansiesc.h>
#include <ipxe/lineconsole.h>
-/** Line-based console ANSI escape sequence handlers */
-static struct ansiesc_handler line_ansiesc_handlers[] = {
- { 0, NULL }
-};
-
-/** Line-based console ANSI escape sequence context */
-static struct ansiesc_context line_ansiesc_ctx = {
- .handlers = line_ansiesc_handlers,
-};
-
/**
* Print a character to a line-based console
*
@@ -48,7 +38,7 @@ static struct ansiesc_context line_ansiesc_ctx = {
size_t line_putchar ( struct line_console *line, int character ) {
/* Strip ANSI escape sequences */
- character = ansiesc_process ( &line_ansiesc_ctx, character );
+ character = ansiesc_process ( &line->ctx, character );
if ( character < 0 )
return 0;