aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cramfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cramfs_fs.h')
-rw-r--r--include/linux/cramfs_fs.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/include/linux/cramfs_fs.h b/include/linux/cramfs_fs.h
index a8948f34b77..a41f38428c3 100644
--- a/include/linux/cramfs_fs.h
+++ b/include/linux/cramfs_fs.h
@@ -1,13 +1,7 @@
1#ifndef __CRAMFS_H 1#ifndef __CRAMFS_H
2#define __CRAMFS_H 2#define __CRAMFS_H
3 3
4#ifndef __KERNEL__ 4#include <linux/types.h>
5
6typedef unsigned char u8;
7typedef unsigned short u16;
8typedef unsigned int u32;
9
10#endif
11 5
12#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ 6#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
13#define CRAMFS_SIGNATURE "Compressed ROMFS" 7#define CRAMFS_SIGNATURE "Compressed ROMFS"
@@ -33,9 +27,9 @@ typedef unsigned int u32;
33 * Reasonably terse representation of the inode data. 27 * Reasonably terse representation of the inode data.
34 */ 28 */
35struct cramfs_inode { 29struct cramfs_inode {
36 u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; 30 __u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH;
37 /* SIZE for device files is i_rdev */ 31 /* SIZE for device files is i_rdev */
38 u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; 32 __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH;
39 /* NAMELEN is the length of the file name, divided by 4 and 33 /* NAMELEN is the length of the file name, divided by 4 and
40 rounded up. (cramfs doesn't support hard links.) */ 34 rounded up. (cramfs doesn't support hard links.) */
41 /* OFFSET: For symlinks and non-empty regular files, this 35 /* OFFSET: For symlinks and non-empty regular files, this
@@ -44,27 +38,27 @@ struct cramfs_inode {
44 see README). For non-empty directories it is the offset 38 see README). For non-empty directories it is the offset
45 (divided by 4) of the inode of the first file in that 39 (divided by 4) of the inode of the first file in that
46 directory. For anything else, offset is zero. */ 40 directory. For anything else, offset is zero. */
47 u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; 41 __u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH;
48}; 42};
49 43
50struct cramfs_info { 44struct cramfs_info {
51 u32 crc; 45 __u32 crc;
52 u32 edition; 46 __u32 edition;
53 u32 blocks; 47 __u32 blocks;
54 u32 files; 48 __u32 files;
55}; 49};
56 50
57/* 51/*
58 * Superblock information at the beginning of the FS. 52 * Superblock information at the beginning of the FS.
59 */ 53 */
60struct cramfs_super { 54struct cramfs_super {
61 u32 magic; /* 0x28cd3d45 - random number */ 55 __u32 magic; /* 0x28cd3d45 - random number */
62 u32 size; /* length in bytes */ 56 __u32 size; /* length in bytes */
63 u32 flags; /* feature flags */ 57 __u32 flags; /* feature flags */
64 u32 future; /* reserved for future use */ 58 __u32 future; /* reserved for future use */
65 u8 signature[16]; /* "Compressed ROMFS" */ 59 __u8 signature[16]; /* "Compressed ROMFS" */
66 struct cramfs_info fsid; /* unique filesystem info */ 60 struct cramfs_info fsid; /* unique filesystem info */
67 u8 name[16]; /* user-defined name */ 61 __u8 name[16]; /* user-defined name */
68 struct cramfs_inode root; /* root inode data */ 62 struct cramfs_inode root; /* root inode data */
69}; 63};
70 64