Browse Source

[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 years ago
parent
commit
8a61e37e2e
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/usr/autoboot.c

+ 7
- 1
src/usr/autoboot.c View File

175
 	if ( filename ) {
175
 	if ( filename ) {
176
 		if ( ( rc = imgdownload ( image, filename,
176
 		if ( ( rc = imgdownload ( image, filename,
177
 					  register_and_autoexec_image ) ) !=0){
177
 					  register_and_autoexec_image ) ) !=0){
178
-			printf ( "Could not chain image: %s\n",
178
+			printf ( "\nCould not chain image: %s\n",
179
 				 strerror ( rc ) );
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
 	} else if ( root_path ) {
187
 	} else if ( root_path ) {
182
 		if ( fetch_intz_setting ( NULL, &skip_san_boot_setting) == 0 ) {
188
 		if ( fetch_intz_setting ( NULL, &skip_san_boot_setting) == 0 ) {

Loading…
Cancel
Save