with this patch the selected Entry in bootmenu can be set by
environment-var bootmenu_default=<number>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
int len;
char *sep;
+ char *default_str;
struct bootmenu_entry *entry;
menu = malloc(sizeof(struct bootmenu_data));
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) {