]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: Allow to compile CMD_UBIFS when SPL is enabled
authorPali Rohár <pali@kernel.org>
Tue, 5 Apr 2022 13:49:24 +0000 (15:49 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 14 Apr 2022 19:39:15 +0000 (15:39 -0400)
Currently there is no UBIFS support in SPL. But macro CONFIG_CMD_UBIFS is
defined also when building SPL. when both CMD_UBIFS and SPL are enabled
then build process throw compile error.

Fix check for ubifs code in fstypes[] to allow compiling CMD_UBIFS only in
proper U-Boot.

Signed-off-by: Pali Rohár <pali@kernel.org>
fs/fs.c

diff --git a/fs/fs.c b/fs/fs.c
index 2b0a242e8c7959d7f33b22f36569af0d60a2a363..c67a1c7876a64f00ab5e837035e09ba9bc34081f 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -267,6 +267,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 +287,7 @@ static struct fstype_info fstypes[] = {
                .ln = fs_ln_unsupported,
        },
 #endif
+#endif
 #ifdef CONFIG_FS_BTRFS
        {
                .fstype = FS_TYPE_BTRFS,