Bläddra i källkod

[autoboot] Avoid excess backspacing after displaying Ctrl-B prompt

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>
tags/v1.20.1
Michael Brown 12 år sedan
förälder
incheckning
1d38168064
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3
    1
      src/core/main.c

+ 3
- 1
src/core/main.c Visa fil

@@ -48,7 +48,9 @@ static int shell_banner ( void ) {
48 48
 	if ( BANNER_TIMEOUT <= 0 )
49 49
 		return 0;
50 50
 
51
-	return ( prompt ( "\nPress Ctrl-B for the iPXE command line...",
51
+	/* Prompt user */
52
+	printf ( "\n" );
53
+	return ( prompt ( "Press Ctrl-B for the iPXE command line...",
52 54
 			  ( BANNER_TIMEOUT * 100 ), CTRL_B ) == 0 );
53 55
 }
54 56
 

Laddar…
Avbryt
Spara