From c24e58f599085efa79a61cb62170b6b2164b8ce9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 24 Apr 2022 23:31:04 -0600 Subject: 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 --- fs/fs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs') diff --git a/fs/fs.c b/fs/fs.c index b812597..6de1a3eb6 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) { -- cgit v1.1