diff options
author | Simon Glass <sjg@chromium.org> | 2022-04-24 23:31:04 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-25 10:00:03 -0400 |
commit | c24e58f599085efa79a61cb62170b6b2164b8ce9 (patch) | |
tree | 6cd3d3b1f5edb32eb63a42f2fda0e1c53a0c785f /include/fs.h | |
parent | 87571b7f2077c567f8d050abe60ff5578f0b7cd8 (diff) | |
download | u-boot-c24e58f599085efa79a61cb62170b6b2164b8ce9.tar.gz u-boot-c24e58f599085efa79a61cb62170b6b2164b8ce9.tar.bz2 u-boot-c24e58f599085efa79a61cb62170b6b2164b8ce9.zip |
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 'include/fs.h')
-rw-r--r-- | include/fs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h index e2beba36b9..b43f16a692 100644 --- a/include/fs.h +++ b/include/fs.h @@ -57,6 +57,17 @@ int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); */ int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype); +/** + * fs_set_type() - Tell fs layer which filesystem type is used + * + * This is needed when reading from a non-block device such as sandbox. It does + * a similar job to fs_set_blk_dev() but just sets the filesystem type instead + * of detecting it and loading it on the block device + * + * @type: Filesystem type to use (FS_TYPE...) + */ +void fs_set_type(int type); + /* * fs_set_blk_dev_with_part - Set current block device + partition * |