[klibc] kinit: Add ability to mount filesystems via /etc/fstab or cmdline

This patch adds the ability to mount filesystems via an
embedded fstab or via the kernel command line.

When using the kernel command-line, the following format is
required:
'kinit_mount=<fs_dev>;<fs_dir>;<fs_type>;<fs_opts>'

Multiple mount options can be specified; they are evaluated
in the order they appear in the command-line.

Mount directories ('fs_dir') sent in will have '/root'
prepended to them before the actual mount(2) call is made.

Tested: Sent mount commands via kinit_mount= command line;
also used an embedded /etc/fstab file.

Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 file changed