mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fs: introduce hidden CONFIG_FS_WRITABLE option
Date: Tue,  7 Jan 2025 09:04:35 +0100	[thread overview]
Message-ID: <20250107080435.2842334-1-a.fatoum@pengutronix.de> (raw)

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@pengutronix.de>
---
 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




             reply	other threads:[~2025-01-07  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07  8:04 Ahmad Fatoum [this message]
2025-01-08 14:03 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250107080435.2842334-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox