summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-04-24 23:31:04 -0600
committerTom Rini <trini@konsulko.com>2022-04-25 10:00:03 -0400
commitc24e58f599085efa79a61cb62170b6b2164b8ce9 (patch)
tree6cd3d3b1f5edb32eb63a42f2fda0e1c53a0c785f /fs
parent87571b7f2077c567f8d050abe60ff5578f0b7cd8 (diff)
fs: Add a function to set the filesystem type
When sandbox is used with hostfs we won't have a block device, but still must set up the filesystem type before any filesystem operation, such as loading a file. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index b812597ced..6de1a3eb6d 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -36,6 +36,11 @@ static int fs_dev_part;
static struct disk_partition fs_partition;
static int fs_type = FS_TYPE_ANY;
+void fs_set_type(int type)
+{
+ fs_type = type;
+}
+
static inline int fs_probe_unsupported(struct blk_desc *fs_dev_desc,
struct disk_partition *fs_partition)
{