Browse Source

[main] Remove shell prompt when using an embedded image

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
202cf094eb
1 changed files with 13 additions and 14 deletions
  1. 13
    14
      src/core/main.c

+ 13
- 14
src/core/main.c View File

78
 		printf ( " %s", feature->name );
78
 		printf ( " %s", feature->name );
79
 	printf ( "\n" );
79
 	printf ( "\n" );
80
 
80
 
81
-	/* Prompt for shell */
82
-	if ( shell_banner() ) {
83
-		/* User wants shell; just give them a shell */
84
-		shell();
81
+	/* Boot system */
82
+	if ( ( image = first_image() ) != NULL ) {
83
+		/* We have an embedded image; execute it */
84
+		image_exec ( image );
85
 	} else {
85
 	} else {
86
-		/* User doesn't want shell; load and execute the first
87
-		 * image, or autoboot() if we have no images.  If
88
-		 * booting fails for any reason, offer a second chance
89
-		 * to enter the shell for diagnostics.
90
-		 */
91
-		if ( ( image = first_image() ) != NULL ) {
92
-			image_exec ( image );
86
+		/* Prompt for shell */
87
+		if ( shell_banner() ) {
88
+			/* User wants shell; just give them a shell */
89
+			shell();
93
 		} else {
90
 		} else {
91
+			/* Try booting.  If booting fails, offer the
92
+			 * user another chance to enter the shell.
93
+			 */
94
 			autoboot();
94
 			autoboot();
95
+			if ( shell_banner() )
96
+				shell();
95
 		}
97
 		}
96
-
97
-		if ( shell_banner() )
98
-			shell();
99
 	}
98
 	}
100
 
99
 
101
 	shutdown_exit();
100
 	shutdown_exit();

Loading…
Cancel
Save