|
@@ -78,24 +78,23 @@ __asmcall int main ( void ) {
|
78
|
78
|
printf ( " %s", feature->name );
|
79
|
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
|
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
|
90
|
} else {
|
|
91
|
+ /* Try booting. If booting fails, offer the
|
|
92
|
+ * user another chance to enter the shell.
|
|
93
|
+ */
|
94
|
94
|
autoboot();
|
|
95
|
+ if ( shell_banner() )
|
|
96
|
+ shell();
|
95
|
97
|
}
|
96
|
|
-
|
97
|
|
- if ( shell_banner() )
|
98
|
|
- shell();
|
99
|
98
|
}
|
100
|
99
|
|
101
|
100
|
shutdown_exit();
|