Skip to contentSkip to conversation

fs: Rework filesystem guards for xPL phases

PATCH In review Tom Rini 1 participant 2 messages Oct 1, 2025 – Oct 11, 2025 VFS

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 fs: Rework filesystem guards for xPL phases

When adding filesystems to the table in fs/fs.c we need to use CONFIG_IS_ENABLED(FS_xxx) so that we only include references to a given filesystem when CONFIG_FS_xxx or CONFIG_SPL_FS_xxx or similar are enabled. Update the filesystems which weren't doing this to follow that pattern.

---
 fs/fs.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
fs/fs.c +3 -5
index 2650328b3585..c7706d9af859 100644
@@ -316,8 +316,7 @@ static struct fstype_info fstypes[] = {
 	},
 #endif
 #endif
-#ifndef CONFIG_XPL_BUILD
-#ifdef CONFIG_FS_BTRFS
+#if CONFIG_IS_ENABLED(FS_BTRFS)
 	{
 		.fstype = FS_TYPE_BTRFS,
 		.name = "btrfs",
@@ -337,7 +336,6 @@ static struct fstype_info fstypes[] = {
 		.rename = fs_rename_unsupported,
 	},
 #endif
-#endif
 #if CONFIG_IS_ENABLED(FS_SQUASHFS)
 	{
 		.fstype = FS_TYPE_SQUASHFS,
@@ -360,7 +358,7 @@ static struct fstype_info fstypes[] = {
 		.rename = fs_rename_unsupported,
 	},
 #endif
-#if IS_ENABLED(CONFIG_FS_EROFS)
+#if CONFIG_IS_ENABLED(FS_EROFS)
 	{
 		.fstype = FS_TYPE_EROFS,
 		.name = "erofs",
@@ -382,7 +380,7 @@ static struct fstype_info fstypes[] = {
 		.rename = fs_rename_unsupported,
 	},
 #endif
-#if IS_ENABLED(CONFIG_FS_EXFAT)
+#if CONFIG_IS_ENABLED(FS_EXFAT)
 	{
 		.fstype = FS_TYPE_EXFAT,
 		.name = "exfat",
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 8 lines · Tom Rini

When adding filesystems to the table in fs/fs.c we need to use CONFIG_IS_ENABLED(FS_xxx) so that we only include references to a given filesystem when CONFIG_FS_xxx or CONFIG_SPL_FS_xxx or similar are enabled. Update the filesystems which weren't doing this to follow that pattern.

[...]

Applied to u-boot/master, thanks!

[1/1] fs: Rework filesystem guards for xPL phases

      commit: 42b353412517ecfc9ba93dcd7f31e0e3557af413
Signature · 1 line
Tom