]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: Allow to compile FS_BTRFS when SPL is enabled
authorPali Rohár <pali@kernel.org>
Thu, 7 Apr 2022 12:53:25 +0000 (14:53 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 19 Apr 2022 18:54:15 +0000 (14:54 -0400)
Currently there is no btrfs support in SPL. But macro CONFIG_FS_BTRFS is
defined also when building SPL. When both FS_BTRFS and SPL are enabled
then build process throw compile error.

Fix check for btrfs code in fstypes[] to allow compiling FS_BTRFS 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 c67a1c7876a64f00ab5e837035e09ba9bc34081f..97d47916f38fd7ad5c36cb568319539894edd2c3 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -288,6 +288,7 @@ static struct fstype_info fstypes[] = {
        },
 #endif
 #endif
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_FS_BTRFS
        {
                .fstype = FS_TYPE_BTRFS,
@@ -307,6 +308,7 @@ static struct fstype_info fstypes[] = {
                .ln = fs_ln_unsupported,
        },
 #endif
+#endif
 #if IS_ENABLED(CONFIG_FS_SQUASHFS)
        {
                .fstype = FS_TYPE_SQUASHFS,