Signed-off-by: Jason Hobbs <jason.ho...@calxeda.com> --- changes in v2: - expose abortboot externally instead of using a wrapper - expose abortboot externally when CONFIG_MENU is set
common/main.c | 12 ++++++++---- include/common.h | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/main.c b/common/main.c index 1f64523..a031a33 100644 --- a/common/main.c +++ b/common/main.c @@ -56,10 +56,6 @@ void update_tftp (void); #define MAX_DELAY_STOP_STR 32 -#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) -static int abortboot(int); -#endif - #undef DEBUG_PARSER char console_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O buffer */ @@ -91,7 +87,11 @@ extern void mdm_init(void); /* defined in board.c */ */ #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) # if defined(CONFIG_AUTOBOOT_KEYED) +#ifdef CONFIG_MENU +int abortboot(int bootdelay) +#else static __inline__ int abortboot(int bootdelay) +#endif { int abort = 0; uint64_t etime = endtick(bootdelay); @@ -205,7 +205,11 @@ static __inline__ int abortboot(int bootdelay) static int menukey = 0; #endif +#ifdef CONFIG_MENU +int abortboot(int bootdelay) +#else static __inline__ int abortboot(int bootdelay) +#endif { int abort = 0; diff --git a/include/common.h b/include/common.h index e659630..d8b8a79 100644 --- a/include/common.h +++ b/include/common.h @@ -234,6 +234,9 @@ 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 /* arch/$(ARCH)/lib/board.c */ void board_init_f (ulong) __attribute__ ((noreturn)); -- 1.7.0.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot