[PATCH 7/9] menu: avoid errors when building submenus

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 11 04:50:28 EDT 2013

On Sun, Mar 10, 2013 at 11:29:17PM +0100, vj wrote:
> On Sun, Mar 10, 2013 at 2:16 PM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj at jcrosoft.com> wrote:
> > On 00:19 Sun 10 Mar     , Vicente Bergas wrote:
> >> boot-menu-add-entry should not add menu entries to non-existent menus
> >> to solve the issue a new parameter is passed indicating the current menu
> > how this could happend?
> This happens always a menu with "Boot: " entries is created.
> "Boot: " entries are created calling "boot-menu-add-entry" as
> "boot-template" suggests.
> All boot entries are expected to be editable or deleted, so, when the
> user requests, a new menu is build with all the entries to be edited
> or deleted.
> What happens is that "boot-menu-add-entry" adds all three entries at
> once, one for the boot menu, another for the still non-existent edit
> menu and a third one for the still non-existent delete menu.
> When the user selects the edit menu then "boot-menu-add-entry" adds
> again three entries, this time the non-existent menus are the boot and
> delete ones.
> Idem for the delete menu...
> When an item is added to a non-existent menu an error is reported, but
> it's not critical and the menu being created is shown correctly.
> This patch addresses that.

I see the problem, but I think we should either live with it or find a
better solution to the problem. I don't really want to increase the
complexity of the menu scripts. I had a hard time implementing it with
halfway correct behaviour. If now we have to add more complexity it
IMO shows we should rethink it.


Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

More information about the barebox mailing list