summaryrefslogtreecommitdiffstats
path: root/fs/cramfs/cramfs.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-16 01:07:24 +0000
commit95db6b748fc86297827fbd9c9ef174d491c9ad89 (patch)
tree27a92a942821cde1edda9a1b088718d436b3efe4 /fs/cramfs/cramfs.h
parent45b27b0a0652331d104c953a5b192d843fff88f8 (diff)
Merge with Linux 2.3.40.
Diffstat (limited to 'fs/cramfs/cramfs.h')
-rw-r--r--fs/cramfs/cramfs.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/fs/cramfs/cramfs.h b/fs/cramfs/cramfs.h
index e98cd7309..b7e4e7600 100644
--- a/fs/cramfs/cramfs.h
+++ b/fs/cramfs/cramfs.h
@@ -5,17 +5,20 @@
#define CRAMFS_SIGNATURE "Compressed ROMFS"
/*
- * Reasonably terse representation of the inode
- * data.. When the mode of the inode indicates
- * a special device node, the "offset" bits will
- * encode i_rdev. In other cases, "offset" points
- * to the ROM image for the actual file data
- * (whether that data be directory or compressed
- * file data depends on the inode type again)
+ * Reasonably terse representation of the inode data.
*/
struct cramfs_inode {
u32 mode:16, uid:16;
+ /* SIZE for device files is i_rdev */
u32 size:24, gid:8;
+ /* NAMELEN is the length of the file name, divided by 4 and
+ rounded up. (cramfs doesn't support hard links.) */
+ /* OFFSET: For symlinks and non-empty regular files, this
+ contains the offset (divided by 4) of the file data in
+ compressed form (starting with an array of block pointers;
+ see README). For non-empty directories it is the offset
+ (divided by 4) of the inode of the first file in that
+ directory. For anything else, offset is zero. */
u32 namelen:6, offset:26;
};
@@ -24,7 +27,8 @@ struct cramfs_inode {
*/
struct cramfs_super {
u32 magic; /* 0x28cd3d45 - random number */
- u32 size; /* > offset, < 2**26 */
+ u32 size; /* Not used. mkcramfs currently
+ writes a constant 1<<16 here. */
u32 flags; /* 0 */
u32 future; /* 0 */
u8 signature[16]; /* "Compressed ROMFS" */
@@ -33,6 +37,13 @@ struct cramfs_super {
struct cramfs_inode root; /* Root inode data */
};
+/*
+ * Valid values in super.flags. Currently we refuse to mount
+ * if (flags & ~CRAMFS_SUPPORTED_FLAGS). Maybe that should be
+ * changed to test super.future instead.
+ */
+#define CRAMFS_SUPPORTED_FLAGS (0xff)
+
/* Uncompression interfaces to the underlying zlib */
int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen);
int cramfs_uncompress_init(void);