mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
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>
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
Reference in New Issue
Block a user