summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/startup.c b/common/startup.c
index 7e0f7d6b64..71a28a7be8 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -235,7 +235,7 @@ void set_autoboot_state(enum autoboot_state autoboot)
*/
enum autoboot_state do_autoboot_countdown(void)
{
- enum autoboot_state autoboot_state;
+ static enum autoboot_state autoboot_state = AUTOBOOT_UNKNOWN;
unsigned flags = CONSOLE_COUNTDOWN_EXTERN;
int ret;
struct stat s;
@@ -243,6 +243,9 @@ enum autoboot_state do_autoboot_countdown(void)
char *abortkeys = NULL;
unsigned char outkey;
+ if (autoboot_state != AUTOBOOT_UNKNOWN)
+ return autoboot_state;
+
if (global_autoboot_state != AUTOBOOT_COUNTDOWN)
return global_autoboot_state;