mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
main: Separate out the two abortboot() functions
There are two implementations of abortboot(). Turn these into two separate functions, and create a single abortboot() which calls either one or the other. Also it seems that nothing uses abortboot() outside main, so make it static. At this point there is no further use of CONFIG_MENU in main.c. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
ea5427e260
commit
063ae006ae
2 changed files with 11 additions and 11 deletions
|
@ -89,10 +89,7 @@ extern void mdm_init(void); /* defined in board.c */
|
|||
*/
|
||||
#if defined(CONFIG_BOOTDELAY)
|
||||
# if defined(CONFIG_AUTOBOOT_KEYED)
|
||||
#ifndef CONFIG_MENU
|
||||
static inline
|
||||
#endif
|
||||
int abortboot(int bootdelay)
|
||||
static int abortboot_keyed(int bootdelay)
|
||||
{
|
||||
int abort = 0;
|
||||
uint64_t etime = endtick(bootdelay);
|
||||
|
@ -211,10 +208,7 @@ int abortboot(int bootdelay)
|
|||
static int menukey = 0;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_MENU
|
||||
static inline
|
||||
#endif
|
||||
int abortboot(int bootdelay)
|
||||
static int abortboot_normal(int bootdelay)
|
||||
{
|
||||
int abort = 0;
|
||||
unsigned long ts;
|
||||
|
@ -271,6 +265,15 @@ int abortboot(int bootdelay)
|
|||
return abort;
|
||||
}
|
||||
# endif /* CONFIG_AUTOBOOT_KEYED */
|
||||
|
||||
static int abortboot(int bootdelay)
|
||||
{
|
||||
#ifdef CONFIG_AUTOBOOT_KEYED
|
||||
return abortboot_keyed(bootdelay);
|
||||
#else
|
||||
return abortboot_normal(bootdelay);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_BOOTDELAY */
|
||||
|
||||
/*
|
||||
|
|
|
@ -310,9 +310,6 @@ int readline_into_buffer(const char *const prompt, char *buffer,
|
|||
int parse_line (char *, char *[]);
|
||||
void init_cmd_timeout(void);
|
||||
void reset_cmd_timeout(void);
|
||||
#ifdef CONFIG_MENU
|
||||
int abortboot(int bootdelay);
|
||||
#endif
|
||||
extern char console_buffer[];
|
||||
|
||||
/* arch/$(ARCH)/lib/board.c */
|
||||
|
|
Loading…
Reference in a new issue