We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>