]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[cmdline] Always clear screen after reconfiguring console
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Jan 2014 22:32:40 +0000 (22:32 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 22 Jan 2014 22:43:55 +0000 (22:43 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/hci/commands/console_cmd.c

index 957c5aa09e4a84c2b940a2d1dd78e15d8673f725..db4136868c3cb714d63fbdf5d8fffcd6de42a3ee 100644 (file)
@@ -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: