Comments
Patch
@@ -92,11 +92,7 @@ extern void mdm_init(void); /* defined in board.c */
* returns: 0 - no key string, allow autoboot 1 - got key string, abort
*/
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
-# 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);
@@ -209,16 +205,11 @@ int abortboot(int bootdelay)
return abort;
}
-# else /* !defined(CONFIG_AUTOBOOT_KEYED) */
-
#ifdef CONFIG_MENUKEY
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;
@@ -274,7 +265,14 @@ int abortboot(int bootdelay)
return abort;
}
-# endif /* CONFIG_AUTOBOOT_KEYED */
+
+static int abortboot(int bootdelay)
+{
+ if (autoconf_autoboot_keyed())
+ return abortboot_keyed(bootdelay);
+ else
+ return abortboot_normal(bootdelay);
+}
#endif /* CONFIG_BOOTDELAY >= 0 */
/*
@@ -297,9 +297,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 */