aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-04 12:50:04 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-04 12:50:04 -0400
commit05f75fd3bb92d9f5eaa8620195ff77a89431f2d2 (patch)
tree808d4b7812c025cafde7ca69cfbf5c8624904d03 /include
parentcb8c1fdc0cf703e3297499dcd1a4b20b27570a7a (diff)
Include <linux/types.h> and use __uXX types in <linux/cramfs_fs.h>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include')
-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 a8948f34b776..a41f38428c37 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