[Concept,13/21] isofs: Move struct isofs_options to isofs.h

Message ID 20260416165733.2923423-14-sjg@u-boot.org
State New
Headers
Series fs: Add ISO 9660 filesystem driver ported from Linux |

Commit Message

Simon Glass April 16, 2026, 4:57 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

The struct isofs_options is defined locally in inode.c, but the
U-Boot integration layer (interface.c) also needs access to set
up mount options when probing an ISO 9660 filesystem.

Move the struct definition to isofs.h so it is visible to both
inode.c and interface.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 fs/isofs/inode.c | 23 +----------------------
 fs/isofs/isofs.h | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 22 deletions(-)
  

Patch

diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 4d0c83eb5df..e50664b29e9 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -131,28 +131,7 @@  static const struct dentry_operations isofs_dentry_ops[] = {
 #endif
 };
 
-struct isofs_options{
-	unsigned int rock:1;
-	unsigned int joliet:1;
-	unsigned int cruft:1;
-	unsigned int hide:1;
-	unsigned int showassoc:1;
-	unsigned int nocompress:1;
-	unsigned int overriderockperm:1;
-	unsigned int uid_set:1;
-	unsigned int gid_set:1;
-	unsigned char map;
-	unsigned char check;
-	unsigned int blocksize;
-	umode_t fmode;
-	umode_t dmode;
-	kgid_t gid;
-	kuid_t uid;
-	char *iocharset;
-	/* LVE */
-	s32 session;
-	s32 sbsector;
-};
+/* struct isofs_options is defined in isofs.h */
 
 /*
  * Compute the hash for the isofs name corresponding to the dentry.
diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h
index 66a21648623..95d85f58733 100644
--- a/fs/isofs/isofs.h
+++ b/fs/isofs/isofs.h
@@ -202,6 +202,32 @@  isofs_normalize_block_and_offset(struct iso_directory_record *de,
 	}
 }
 
+/*
+ * Mount options - defined here so interface.c can set them up.
+ */
+struct isofs_options{
+	unsigned int rock:1;
+	unsigned int joliet:1;
+	unsigned int cruft:1;
+	unsigned int hide:1;
+	unsigned int showassoc:1;
+	unsigned int nocompress:1;
+	unsigned int overriderockperm:1;
+	unsigned int uid_set:1;
+	unsigned int gid_set:1;
+	unsigned char map;
+	unsigned char check;
+	unsigned int blocksize;
+	umode_t fmode;
+	umode_t dmode;
+	kgid_t gid;
+	kuid_t uid;
+	char *iocharset;
+	/* LVE */
+	s32 session;
+	s32 sbsector;
+};
+
 extern const struct inode_operations isofs_dir_inode_operations;
 extern const struct file_operations isofs_dir_operations;
 extern const struct address_space_operations isofs_symlink_aops;