diff options
author | Michael Brown | 2014-01-22 23:32:40 +0100 |
---|---|---|
committer | Michael Brown | 2014-01-22 23:43:55 +0100 |
commit | 290a43efdaf8760f5ac587c6c49ea853279384d3 (patch) | |
tree | d344592651139cc94ee459ecd9fa2321c6cb1de9 /src/hci | |
parent | [fbcon] Allow ANSI CUP with missing arguments (diff) | |
download | ipxe-290a43efdaf8760f5ac587c6c49ea853279384d3.tar.gz ipxe-290a43efdaf8760f5ac587c6c49ea853279384d3.tar.xz ipxe-290a43efdaf8760f5ac587c6c49ea853279384d3.zip |
[cmdline] Always clear screen after reconfiguring console
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r-- | src/hci/commands/console_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hci/commands/console_cmd.c b/src/hci/commands/console_cmd.c index 957c5aa0..db413686 100644 --- a/src/hci/commands/console_cmd.c +++ b/src/hci/commands/console_cmd.c @@ -32,6 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/console.h> #include <ipxe/image.h> #include <ipxe/pixbuf.h> +#include <ipxe/ansiesc.h> #include <ipxe/ansicol.h> #include <usr/imgmgmt.h> @@ -114,6 +115,10 @@ static int console_exec ( int argc, char **argv ) { goto err_configure; } + /* Reapply default colour pair and clear screen */ + ansicol_set_pair ( CPAIR_DEFAULT ); + printf ( CSI "2J" CSI "H" ); + err_configure: pixbuf_put ( opts.config.pixbuf ); err_pixbuf: |