Given that most file systems in barebox are read-only, it's arguably useful to see at a glance, which file systems aren't to aid with porting write-enabled file systems. Let's select a new hidden FS_WRITABLE option in these cases. Maybe in future, we could even save some code size if writing isn't required. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- fs/Kconfig | 14 ++++++++++++++ fs/fat/Kconfig | 1 + 2 files changed, 15 insertions(+) diff --git a/fs/Kconfig b/fs/Kconfig index 27981b644407..9118d1114daa 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -13,6 +13,12 @@ config FS_LEGACY invisible option selected by filesystem drivers which haven't been ported to dentry cache. +config FS_WRITABLE + bool + help + invisible option selected by filesystem drivers that can + write and are not fully read-only. + if FS_LEGACY comment "Some selected filesystems still use the legacy FS API." comment "Consider updating them." @@ -32,16 +38,19 @@ config FS_RAMFS bool default y prompt "ramfs support" + select FS_WRITABLE config FS_DEVFS bool default y prompt "devfs support" + select FS_WRITABLE config FS_TFTP bool prompt "tftp support" depends on NET + select FS_WRITABLE config FS_TFTP_MAX_WINDOW_SIZE int @@ -71,6 +80,7 @@ config FS_NFS config FS_EFI depends on EFI_PAYLOAD select FS_LEGACY + select FS_WRITABLE bool prompt "EFI filesystem support" help @@ -80,6 +90,7 @@ config FS_EFI config FS_EFIVARFS depends on EFI_PAYLOAD select FS_LEGACY + select FS_WRITABLE bool prompt "EFI variable filesystem support (efivarfs)" help @@ -115,6 +126,7 @@ config FS_UIMAGEFS config FS_SMHFS depends on SEMIHOSTING select FS_LEGACY + select FS_WRITABLE bool prompt "Semihosting FS support" help @@ -129,6 +141,7 @@ config FS_RATP bool depends on RATP select FS_LEGACY + select FS_WRITABLE prompt "RATP filesystem support" help This enables support for transferring files over RATP. A host can @@ -138,6 +151,7 @@ config FS_UBOOTVARFS bool depends on UBOOTVAR prompt "U-Boot environment variable filesystem support" + select FS_WRITABLE help This filesystem driver provides access to U-Boot environment variables. diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig index 53f784ee54d5..837eb9ffdd60 100644 --- a/fs/fat/Kconfig +++ b/fs/fat/Kconfig @@ -10,6 +10,7 @@ if FS_FAT config FS_FAT_WRITE bool prompt "FAT write support" + select FS_WRITABLE help Enable support for writing in FAT partitions. Note: This doesn't apply to FAT usage in barebox PBL. -- 2.39.5