Remove grid gui module
[qi-bootmenu/guyou.git] / fstype / cramfs_fs.h
blob6f5ad4f41d64ae31a53d3226327e4358c2f7080f
1 #ifndef __CRAMFS_H
2 #define __CRAMFS_H
4 #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
5 #define CRAMFS_SIGNATURE "Compressed ROMFS"
7 /*
8 * Width of various bitfields in struct cramfs_inode.
9 * Primarily used to generate warnings in mkcramfs.
11 #define CRAMFS_MODE_WIDTH 16
12 #define CRAMFS_UID_WIDTH 16
13 #define CRAMFS_SIZE_WIDTH 24
14 #define CRAMFS_GID_WIDTH 8
15 #define CRAMFS_NAMELEN_WIDTH 6
16 #define CRAMFS_OFFSET_WIDTH 26
19 * Since inode.namelen is a unsigned 6-bit number, the maximum cramfs
20 * path length is 63 << 2 = 252.
22 #define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2)
25 * Reasonably terse representation of the inode data.
27 struct cramfs_inode {
28 __u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH;
29 /* SIZE for device files is i_rdev */
30 __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH;
31 /* NAMELEN is the length of the file name, divided by 4 and
32 rounded up. (cramfs doesn't support hard links.) */
33 /* OFFSET: For symlinks and non-empty regular files, this
34 contains the offset (divided by 4) of the file data in
35 compressed form (starting with an array of block pointers;
36 see README). For non-empty directories it is the offset
37 (divided by 4) of the inode of the first file in that
38 directory. For anything else, offset is zero. */
39 __u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH;
42 struct cramfs_info {
43 __u32 crc;
44 __u32 edition;
45 __u32 blocks;
46 __u32 files;
50 * Superblock information at the beginning of the FS.
52 struct cramfs_super {
53 __u32 magic; /* 0x28cd3d45 - random number */
54 __u32 size; /* length in bytes */
55 __u32 flags; /* feature flags */
56 __u32 future; /* reserved for future use */
57 __u8 signature[16]; /* "Compressed ROMFS" */
58 struct cramfs_info fsid; /* unique filesystem info */
59 __u8 name[16]; /* user-defined name */
60 struct cramfs_inode root; /* root inode data */
64 * Feature flags
66 * 0x00000000 - 0x000000ff: features that work for all past kernels
67 * 0x00000100 - 0xffffffff: features that don't work for past kernels
69 #define CRAMFS_FLAG_FSID_VERSION_2 0x00000001 /* fsid version #2 */
70 #define CRAMFS_FLAG_SORTED_DIRS 0x00000002 /* sorted dirs */
71 #define CRAMFS_FLAG_HOLES 0x00000100 /* support for holes */
72 #define CRAMFS_FLAG_WRONG_SIGNATURE 0x00000200 /* reserved */
73 #define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400 /* shifted root fs */
76 * Valid values in super.flags. Currently we refuse to mount
77 * if (flags & ~CRAMFS_SUPPORTED_FLAGS). Maybe that should be
78 * changed to test super.future instead.
80 #define CRAMFS_SUPPORTED_FLAGS ( 0x000000ff \
81 | CRAMFS_FLAG_HOLES \
82 | CRAMFS_FLAG_WRONG_SIGNATURE \
83 | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
85 #endif