summaryrefslogtreecommitdiffstats
path: root/common/boot.c
diff options
context:
space:
mode:
authorAleksey Kuleshov <rndfax@yandex.ru>2016-08-18 17:05:03 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-05 08:26:47 +0200
commitbf2abf90501858a97bf1e05024d963800312a5c4 (patch)
treeb60fe9ed29b48a16e3cfd65992aca9832d8a6491 /common/boot.c
parentd0b8f4e0752fbe5e44fd9b2e6143ce80c0f5d4eb (diff)
downloadbarebox-bf2abf90501858a97bf1e05024d963800312a5c4.tar.gz
barebox-bf2abf90501858a97bf1e05024d963800312a5c4.tar.xz
rework menu so that it can support multiline titles
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/boot.c')
-rw-r--r--common/boot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/boot.c b/common/boot.c
index 0e9f27f9bc..bc90502284 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -43,7 +43,7 @@ struct bootentries *bootentries_alloc(void)
if (IS_ENABLED(CONFIG_MENU)) {
bootentries->menu = menu_alloc();
- bootentries->menu->display = basprintf("boot");
+ menu_add_title(bootentries->menu, basprintf("boot"));
}
return bootentries;
@@ -61,8 +61,12 @@ void bootentries_free(struct bootentries *bootentries)
be->release(be);
}
- if (bootentries->menu)
+ if (bootentries->menu) {
+ int i;
+ for (i = 0; i < bootentries->menu->display_lines; i++)
+ free(bootentries->menu->display[i]);
free(bootentries->menu->display);
+ }
free(bootentries->menu);
free(bootentries);
}