mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 04:50:25 +03:00
[prompt] Replace shell_banner() with a generic prompt() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -18,8 +18,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#include <ipxe/init.h>
|
||||
#include <ipxe/features.h>
|
||||
#include <ipxe/shell.h>
|
||||
#include <ipxe/shell_banner.h>
|
||||
#include <ipxe/image.h>
|
||||
#include <ipxe/keys.h>
|
||||
#include <usr/prompt.h>
|
||||
#include <usr/autoboot.h>
|
||||
#include <config/general.h>
|
||||
|
||||
@@ -27,6 +28,21 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define BOLD "\033[1m"
|
||||
#define CYAN "\033[36m"
|
||||
|
||||
/**
|
||||
* Prompt for shell entry
|
||||
*
|
||||
* @ret enter_shell User wants to enter shell
|
||||
*/
|
||||
static int shell_banner ( void ) {
|
||||
|
||||
/* Skip prompt if timeout is zero */
|
||||
if ( BANNER_TIMEOUT <= 0 )
|
||||
return 0;
|
||||
|
||||
return ( prompt ( "\nPress Ctrl-B for the iPXE command line...",
|
||||
( BANNER_TIMEOUT * 100 ), CTRL_B ) == 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Main entry point
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user