summaryrefslogtreecommitdiff
path: root/common/autoboot.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-21 05:51:21 +0300
committerTom Rini <trini@konsulko.com>2019-08-02 18:19:14 +0300
commit8fc31e23aa83dfe9a01bec5738ccbed7d4ad442e (patch)
tree50379cccc118437797e13565a9899591c726d687 /common/autoboot.c
parent2452bb7636beb5eeae29185518a899349289c609 (diff)
downloadu-boot-8fc31e23aa83dfe9a01bec5738ccbed7d4ad442e.tar.xz
autoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY
Since this is part of the autoboot functionality, it makes sense to name it with an AUTOBOOT prefix. No mainline boards use it so this should be safe, and downstream boards will need to adjust. Since this option is just an integer value, it really needs another option to control whether the feature is enabled or not. Add a new CONFIG_USE_AUTOBOOT_MENUKEY for that. This fits better with how things are done with Kconfig, avoiding the need to use a specific value to disable the feature. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/autoboot.c')
-rw-r--r--common/autoboot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/autoboot.c b/common/autoboot.c
index a6071ab839..ad189a8ba2 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -224,7 +224,7 @@ static int abortboot_key_sequence(int bootdelay)
return abort;
}
-#ifdef CONFIG_MENUKEY
+#ifdef CONFIG_USE_AUTOBOOT_MENUKEY
static int menukey;
#endif
@@ -252,7 +252,7 @@ static int abortboot_single_key(int bootdelay)
if (tstc()) { /* we got a key press */
abort = 1; /* don't auto boot */
bootdelay = 0; /* no more delay */
-# ifdef CONFIG_MENUKEY
+# ifdef CONFIG_USE_AUTOBOOT_MENUKEY
menukey = getc();
# else
(void) getc(); /* consume input */
@@ -358,11 +358,11 @@ void autoboot_command(const char *s)
#endif
}
-#ifdef CONFIG_MENUKEY
- if (menukey == CONFIG_MENUKEY) {
+#ifdef CONFIG_USE_AUTOBOOT_MENUKEY
+ if (menukey == CONFIG_AUTOBOOT_MENUKEY) {
s = env_get("menucmd");
if (s)
run_command_list(s, -1, 0);
}
-#endif /* CONFIG_MENUKEY */
+#endif /* CONFIG_USE_AUTOBOOT_MENUKEY */
}