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>
We assume it to be non NULL in other places, so
we are in much greater trouble if it actually is.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Often small files are used to store the value od a variable. This
adds a function to easily read such a variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>