]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[autoboot] Avoid excess backspacing after displaying Ctrl-B prompt
authorMichael Brown <mcb30@ipxe.org>
Sun, 21 Oct 2012 01:30:19 +0000 (18:30 -0700)
committerMichael Brown <mcb30@ipxe.org>
Tue, 23 Oct 2012 21:07:50 +0000 (14:07 -0700)
Remove the newline from the "Press Ctrl-B..." prompt string, so that
prompt() does not attempt to backspace beyond the start of the line.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/main.c

index 9fd4a76ff8c075fed134f2536960b6868a579513..9ee31d2dbbe0437737eacb9192570e06de4c49e7 100644 (file)
@@ -48,7 +48,9 @@ static int shell_banner ( void ) {
        if ( BANNER_TIMEOUT <= 0 )
                return 0;
 
-       return ( prompt ( "\nPress Ctrl-B for the iPXE command line...",
+       /* Prompt user */
+       printf ( "\n" );
+       return ( prompt ( "Press Ctrl-B for the iPXE command line...",
                          ( BANNER_TIMEOUT * 100 ), CTRL_B ) == 0 );
 }