[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>
This commit is contained in:
Michael Brown
2012-03-26 21:03:59 +01:00
parent 24b7296319
commit c2875ae329
4 changed files with 20 additions and 11 deletions

View File

@@ -10,6 +10,7 @@
FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
#include <ipxe/ansiesc.h>
/** A line-based console */
struct line_console {
@@ -26,6 +27,8 @@ struct line_console {
* a potential terminating NUL.
*/
size_t len;
/** ANSI escape sequence context */
struct ansiesc_context ctx;
};
extern size_t line_putchar ( struct line_console *line, int character );