sandbox: Add host filesystem
This allows reading of files from the host filesystem in sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
diff --git a/fs/fs.c b/fs/fs.c
index 95c882e..6f5063c 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -20,6 +20,7 @@
#include <ext4fs.h>
#include <fat.h>
#include <fs.h>
+#include <sandboxfs.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -78,6 +79,15 @@
.read = ext4_read_file,
},
#endif
+#ifdef CONFIG_SANDBOX
+ {
+ .fstype = FS_TYPE_SANDBOX,
+ .probe = sandbox_fs_set_blk_dev,
+ .close = sandbox_fs_close,
+ .ls = sandbox_fs_ls,
+ .read = fs_read_sandbox,
+ },
+#endif
{
.fstype = FS_TYPE_ANY,
.probe = fs_probe_unsupported,