Przeglądaj źródła

[autoboot] Tidy up output following NBP execution

If the NBP returns, then always print a trailing newline, since some
NBPs (e.g. wdsnbp.com) leave the cursor in a random position halfway
across the screen.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 lat temu
rodzic
commit
8a61e37e2e
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7
    1
      src/usr/autoboot.c

+ 7
- 1
src/usr/autoboot.c Wyświetl plik

@@ -175,8 +175,14 @@ int uriboot ( struct uri *filename, struct uri *root_path ) {
175 175
 	if ( filename ) {
176 176
 		if ( ( rc = imgdownload ( image, filename,
177 177
 					  register_and_autoexec_image ) ) !=0){
178
-			printf ( "Could not chain image: %s\n",
178
+			printf ( "\nCould not chain image: %s\n",
179 179
 				 strerror ( rc ) );
180
+		} else {
181
+			/* Always print an extra newline, because we
182
+			 * don't know where the NBP may have left the
183
+			 * cursor.
184
+			 */
185
+			printf ( "\n" );
180 186
 		}
181 187
 	} else if ( root_path ) {
182 188
 		if ( fetch_intz_setting ( NULL, &skip_san_boot_setting) == 0 ) {

Ładowanie…
Anuluj
Zapisz