From 8fc31e23aa83dfe9a01bec5738ccbed7d4ad442e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 20 Jul 2019 20:51:21 -0600 Subject: 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 --- common/autoboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/autoboot.c b/common/autoboot.c index a6071ab8391..ad189a8ba28 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 */ } -- cgit v1.2.3