diff options
author | David Howells <dhowells@redhat.com> | 2012-10-13 05:46:48 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-13 05:46:48 -0400 |
commit | 607ca46e97a1b6594b29647d98a32d545c24bdff (patch) | |
tree | 30f4c0784bfddb57332cdc0678bd06d1e77fa185 /include/linux/cramfs_fs.h | |
parent | 08cce05c5a91f5017f4edc9866cf026908c73f9f (diff) |
UAPI: (Scripted) Disintegrate include/linux
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/linux/cramfs_fs.h')
-rw-r--r-- | include/linux/cramfs_fs.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/include/linux/cramfs_fs.h b/include/linux/cramfs_fs.h index 0e7bf272ec2f..133789609f23 100644 --- a/include/linux/cramfs_fs.h +++ b/include/linux/cramfs_fs.h | |||
@@ -1,94 +1,10 @@ | |||
1 | #ifndef __CRAMFS_H | 1 | #ifndef __CRAMFS_H |
2 | #define __CRAMFS_H | 2 | #define __CRAMFS_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/linux/cramfs_fs.h> |
5 | #include <linux/magic.h> | ||
6 | 5 | ||
7 | #define CRAMFS_SIGNATURE "Compressed ROMFS" | ||
8 | |||
9 | /* | ||
10 | * Width of various bitfields in struct cramfs_inode. | ||
11 | * Primarily used to generate warnings in mkcramfs. | ||
12 | */ | ||
13 | #define CRAMFS_MODE_WIDTH 16 | ||
14 | #define CRAMFS_UID_WIDTH 16 | ||
15 | #define CRAMFS_SIZE_WIDTH 24 | ||
16 | #define CRAMFS_GID_WIDTH 8 | ||
17 | #define CRAMFS_NAMELEN_WIDTH 6 | ||
18 | #define CRAMFS_OFFSET_WIDTH 26 | ||
19 | |||
20 | /* | ||
21 | * Since inode.namelen is a unsigned 6-bit number, the maximum cramfs | ||
22 | * path length is 63 << 2 = 252. | ||
23 | */ | ||
24 | #define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2) | ||
25 | |||
26 | /* | ||
27 | * Reasonably terse representation of the inode data. | ||
28 | */ | ||
29 | struct cramfs_inode { | ||
30 | __u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; | ||
31 | /* SIZE for device files is i_rdev */ | ||
32 | __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; | ||
33 | /* NAMELEN is the length of the file name, divided by 4 and | ||
34 | rounded up. (cramfs doesn't support hard links.) */ | ||
35 | /* OFFSET: For symlinks and non-empty regular files, this | ||
36 | contains the offset (divided by 4) of the file data in | ||
37 | compressed form (starting with an array of block pointers; | ||
38 | see README). For non-empty directories it is the offset | ||
39 | (divided by 4) of the inode of the first file in that | ||
40 | directory. For anything else, offset is zero. */ | ||
41 | __u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; | ||
42 | }; | ||
43 | |||
44 | struct cramfs_info { | ||
45 | __u32 crc; | ||
46 | __u32 edition; | ||
47 | __u32 blocks; | ||
48 | __u32 files; | ||
49 | }; | ||
50 | |||
51 | /* | ||
52 | * Superblock information at the beginning of the FS. | ||
53 | */ | ||
54 | struct cramfs_super { | ||
55 | __u32 magic; /* 0x28cd3d45 - random number */ | ||
56 | __u32 size; /* length in bytes */ | ||
57 | __u32 flags; /* feature flags */ | ||
58 | __u32 future; /* reserved for future use */ | ||
59 | __u8 signature[16]; /* "Compressed ROMFS" */ | ||
60 | struct cramfs_info fsid; /* unique filesystem info */ | ||
61 | __u8 name[16]; /* user-defined name */ | ||
62 | struct cramfs_inode root; /* root inode data */ | ||
63 | }; | ||
64 | |||
65 | /* | ||
66 | * Feature flags | ||
67 | * | ||
68 | * 0x00000000 - 0x000000ff: features that work for all past kernels | ||
69 | * 0x00000100 - 0xffffffff: features that don't work for past kernels | ||
70 | */ | ||
71 | #define CRAMFS_FLAG_FSID_VERSION_2 0x00000001 /* fsid version #2 */ | ||
72 | #define CRAMFS_FLAG_SORTED_DIRS 0x00000002 /* sorted dirs */ | ||
73 | #define CRAMFS_FLAG_HOLES 0x00000100 /* support for holes */ | ||
74 | #define CRAMFS_FLAG_WRONG_SIGNATURE 0x00000200 /* reserved */ | ||
75 | #define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400 /* shifted root fs */ | ||
76 | |||
77 | /* | ||
78 | * Valid values in super.flags. Currently we refuse to mount | ||
79 | * if (flags & ~CRAMFS_SUPPORTED_FLAGS). Maybe that should be | ||
80 | * changed to test super.future instead. | ||
81 | */ | ||
82 | #define CRAMFS_SUPPORTED_FLAGS ( 0x000000ff \ | ||
83 | | CRAMFS_FLAG_HOLES \ | ||
84 | | CRAMFS_FLAG_WRONG_SIGNATURE \ | ||
85 | | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET ) | ||
86 | |||
87 | #ifdef __KERNEL__ | ||
88 | /* Uncompression interfaces to the underlying zlib */ | 6 | /* Uncompression interfaces to the underlying zlib */ |
89 | int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); | 7 | int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); |
90 | int cramfs_uncompress_init(void); | 8 | int cramfs_uncompress_init(void); |
91 | void cramfs_uncompress_exit(void); | 9 | void cramfs_uncompress_exit(void); |
92 | #endif /* __KERNEL__ */ | ||
93 | |||
94 | #endif | 10 | #endif |