Convert CONFIG_SYS_SPL_MALLOC_SIZE et al to Kconfig
[platform/kernel/u-boot.git] / fs / fs.c
diff --git a/fs/fs.c b/fs/fs.c
index c3a2ed9..6de1a3e 100644 (file)
--- 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)
 {
@@ -177,7 +182,7 @@ struct fstype_info {
 };
 
 static struct fstype_info fstypes[] = {
-#ifdef CONFIG_FS_FAT
+#if CONFIG_IS_ENABLED(FS_FAT)
        {
                .fstype = FS_TYPE_FAT,
                .name = "fat",
@@ -267,6 +272,7 @@ static struct fstype_info fstypes[] = {
                .ln = fs_ln_unsupported,
        },
 #endif
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_CMD_UBIFS
        {
                .fstype = FS_TYPE_UBIFS,
@@ -286,6 +292,8 @@ static struct fstype_info fstypes[] = {
                .ln = fs_ln_unsupported,
        },
 #endif
+#endif
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_FS_BTRFS
        {
                .fstype = FS_TYPE_BTRFS,
@@ -305,7 +313,8 @@ static struct fstype_info fstypes[] = {
                .ln = fs_ln_unsupported,
        },
 #endif
-#if IS_ENABLED(CONFIG_FS_SQUASHFS)
+#endif
+#if CONFIG_IS_ENABLED(FS_SQUASHFS)
        {
                .fstype = FS_TYPE_SQUASHFS,
                .name = "squashfs",