All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The ext4 implementation has been taken from U-Boot with some
changes:
- No global variables to allow for multiple filesystems to
be mounted and multiple files to be open.
- remove fs internal link following and use the barebox link
implementation.
- remove write support. This is incomplete in U-Boot, so I decided
to skip this for now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>