#include <fat.h>
#include <fs.h>
#include <sandboxfs.h>
+#include <semihostingfs.h>
#include <ubifs_uboot.h>
#include <btrfs.h>
#include <asm/global_data.h>
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)
{
};
static struct fstype_info fstypes[] = {
-#ifdef CONFIG_FS_FAT
+#if CONFIG_IS_ENABLED(FS_FAT)
{
.fstype = FS_TYPE_FAT,
.name = "fat",
.ln = fs_ln_unsupported,
},
#endif
+#ifdef CONFIG_SEMIHOSTING
+ {
+ .fstype = FS_TYPE_SEMIHOSTING,
+ .name = "semihosting",
+ .null_dev_desc_ok = true,
+ .probe = smh_fs_set_blk_dev,
+ .close = fs_close_unsupported,
+ .ls = fs_ls_unsupported,
+ .exists = fs_exists_unsupported,
+ .size = smh_fs_size,
+ .read = smh_fs_read,
+ .write = smh_fs_write,
+ .uuid = fs_uuid_unsupported,
+ .opendir = fs_opendir_unsupported,
+ .unlink = fs_unlink_unsupported,
+ .mkdir = fs_mkdir_unsupported,
+ .ln = fs_ln_unsupported,
+ },
+#endif
+#ifndef CONFIG_SPL_BUILD
#ifdef CONFIG_CMD_UBIFS
{
.fstype = FS_TYPE_UBIFS,
.ln = fs_ln_unsupported,
},
#endif
+#endif
+#ifndef CONFIG_SPL_BUILD
#ifdef CONFIG_FS_BTRFS
{
.fstype = FS_TYPE_BTRFS,
.ln = fs_ln_unsupported,
},
#endif
-#if IS_ENABLED(CONFIG_FS_SQUASHFS)
+#endif
+#if CONFIG_IS_ENABLED(FS_SQUASHFS)
{
.fstype = FS_TYPE_SQUASHFS,
.name = "squashfs",