3f98f13c6e155d7d333630ef60508501acd43bfc
[openwrt/staging/dedeckeh.git] / package / boot / uboot-mediatek / patches / 211-cmd-bootmenu-custom-title.patch
1 --- a/cmd/bootmenu.c
2 +++ b/cmd/bootmenu.c
3 @@ -39,6 +39,7 @@ struct bootmenu_data {
4 int active; /* active menu entry */
5 int count; /* total count of menu entries */
6 struct bootmenu_entry *first; /* first menu entry */
7 + char *mtitle; /* custom menu title */
8 bool last_choiced;
9 };
10
11 @@ -471,7 +472,12 @@ static void menu_display_statusline(stru
12 printf(ANSI_CURSOR_POSITION, 1, 1);
13 puts(ANSI_CLEAR_LINE);
14 printf(ANSI_CURSOR_POSITION, 2, 1);
15 - puts(" *** U-Boot Boot Menu ***");
16 +
17 + if (menu->mtitle)
18 + puts(menu->mtitle);
19 + else
20 + puts(" *** U-Boot Boot Menu ***");
21 +
22 puts(ANSI_CLEAR_LINE_TO_END);
23 printf(ANSI_CURSOR_POSITION, 3, 1);
24 puts(ANSI_CLEAR_LINE);
25 @@ -525,6 +531,7 @@ static void bootmenu_show(int delay)
26 return;
27 }
28
29 + bootmenu->mtitle = env_get("bootmenu_title");
30 for (iter = bootmenu->first; iter; iter = iter->next) {
31 if (!menu_item_add(menu, iter->key, iter))
32 goto cleanup;