mirror of
https://github.com/ipxe/ipxe
synced 2025-12-11 14:03:29 +03:00
[main] Remove shell prompt when using an embedded image
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -78,24 +78,23 @@ __asmcall int main ( void ) {
|
|||||||
printf ( " %s", feature->name );
|
printf ( " %s", feature->name );
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
|
|
||||||
/* Prompt for shell */
|
/* Boot system */
|
||||||
if ( shell_banner() ) {
|
if ( ( image = first_image() ) != NULL ) {
|
||||||
/* User wants shell; just give them a shell */
|
/* We have an embedded image; execute it */
|
||||||
shell();
|
image_exec ( image );
|
||||||
} else {
|
} else {
|
||||||
/* User doesn't want shell; load and execute the first
|
/* Prompt for shell */
|
||||||
* image, or autoboot() if we have no images. If
|
if ( shell_banner() ) {
|
||||||
* booting fails for any reason, offer a second chance
|
/* User wants shell; just give them a shell */
|
||||||
* to enter the shell for diagnostics.
|
|
||||||
*/
|
|
||||||
if ( ( image = first_image() ) != NULL ) {
|
|
||||||
image_exec ( image );
|
|
||||||
} else {
|
|
||||||
autoboot();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( shell_banner() )
|
|
||||||
shell();
|
shell();
|
||||||
|
} else {
|
||||||
|
/* Try booting. If booting fails, offer the
|
||||||
|
* user another chance to enter the shell.
|
||||||
|
*/
|
||||||
|
autoboot();
|
||||||
|
if ( shell_banner() )
|
||||||
|
shell();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shutdown_exit();
|
shutdown_exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user