Skip to content
Snippets Groups Projects
Commit f7bb20a5 authored by Frank Wunderlich's avatar Frank Wunderlich Committed by Tom Rini
Browse files

add default-option to bootmenu


with this patch the selected Entry in bootmenu can be set by
environment-var bootmenu_default=<number>
Signed-off-by: default avatarFrank Wunderlich <frank-w@public-files.de>
parent 430c166b
No related branches found
No related tags found
No related merge requests found
......@@ -253,6 +253,7 @@ static struct bootmenu_data *bootmenu_create(int delay)
int len;
char *sep;
char *default_str;
struct bootmenu_entry *entry;
menu = malloc(sizeof(struct bootmenu_data));
......@@ -263,6 +264,10 @@ static struct bootmenu_data *bootmenu_create(int delay)
menu->active = 0;
menu->first = NULL;
default_str = env_get("bootmenu_default");
if (default_str)
menu->active = (int)simple_strtol(default_str, NULL, 10);
while ((option = bootmenu_getoption(i))) {
sep = strchr(option, '=');
if (!sep) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment