Sfoglia il codice sorgente

[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 anni fa
parent
commit
1d38168064
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3
    1
      src/core/main.c

+ 3
- 1
src/core/main.c Vedi File

@@ -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
 

Loading…
Annulla
Salva