]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[autoboot] Tidy up output following NBP execution
authorMichael Brown <mcb30@ipxe.org>
Wed, 2 Mar 2011 19:39:39 +0000 (19:39 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 2 Mar 2011 19:39:39 +0000 (19:39 +0000)
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>
src/usr/autoboot.c

index 0fe00b3601b0f3386412684f102135c07ce2d553..c743404c0a17131d343cbff055f01bb4847e3b7f 100644 (file)
@@ -175,8 +175,14 @@ int uriboot ( struct uri *filename, struct uri *root_path ) {
        if ( filename ) {
                if ( ( rc = imgdownload ( image, filename,
                                          register_and_autoexec_image ) ) !=0){
-                       printf ( "Could not chain image: %s\n",
+                       printf ( "\nCould not chain image: %s\n",
                                 strerror ( rc ) );
+               } else {
+                       /* Always print an extra newline, because we
+                        * don't know where the NBP may have left the
+                        * cursor.
+                        */
+                       printf ( "\n" );
                }
        } else if ( root_path ) {
                if ( fetch_intz_setting ( NULL, &skip_san_boot_setting) == 0 ) {