diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-23 00:41:22 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-28 09:37:09 +0100 |
commit | ca8edb3b65ae2be88278efac6ca7da1de964be88 (patch) | |
tree | 941380a0a16520e8f18654181cf41e834bf37bad /include/menu.h | |
parent | 45693e0265d086b031739132d64d240b9afd038e (diff) | |
download | barebox-ca8edb3b65ae2be88278efac6ca7da1de964be88.tar.gz barebox-ca8edb3b65ae2be88278efac6ca7da1de964be88.tar.xz |
add menutree command
Creating menus from the shell using the regular 'menu' command is rather
complicated. This adds a 'menutree' command which creates a menu from
a directory structure. In the directory structure each directory corresponds
to a single menu entry. The directory contains the following files:
title - A file containing the title of the entry as shown in the menu
box - If present, the entry is a 'bool' entry. The file contains a variable
name from which the current state of the bool is taken from and saved
to.
action - if present this file contains a shell script which is executed when
when the entry is selected.
If neither 'box' or 'action' are present this entry is considered a submenu
containing more entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/menu.h')
-rw-r--r-- | include/menu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/menu.h b/include/menu.h index f63a405121..8b0ffb1f83 100644 --- a/include/menu.h +++ b/include/menu.h @@ -106,4 +106,6 @@ struct menu_entry* menu_entry_get_by_num(struct menu* m, int num); */ void menu_action_exit(struct menu *m, struct menu_entry *me); +int menutree(const char *path, int toplevel); + #endif /* __MENU_H__ */ |