Skip to content

Commit

Permalink
[cmdline] Always clear screen after reconfiguring console
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jan 22, 2014
1 parent 3ee2c4a commit 290a43e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hci/commands/console_cmd.c
Expand Up @@ -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>

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 290a43e

Please sign in to comment.