aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/romfs_fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/romfs_fs.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/romfs_fs.h')
-rw-r--r--include/linux/romfs_fs.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/include/linux/romfs_fs.h b/include/linux/romfs_fs.h
new file mode 100644
index 000000000000..e20bbf9eb365
--- /dev/null
+++ b/include/linux/romfs_fs.h
@@ -0,0 +1,61 @@
1#ifndef __LINUX_ROMFS_FS_H
2#define __LINUX_ROMFS_FS_H
3
4/* The basic structures of the romfs filesystem */
5
6#define ROMBSIZE BLOCK_SIZE
7#define ROMBSBITS BLOCK_SIZE_BITS
8#define ROMBMASK (ROMBSIZE-1)
9#define ROMFS_MAGIC 0x7275
10
11#define ROMFS_MAXFN 128
12
13#define __mkw(h,l) (((h)&0x00ff)<< 8|((l)&0x00ff))
14#define __mkl(h,l) (((h)&0xffff)<<16|((l)&0xffff))
15#define __mk4(a,b,c,d) cpu_to_be32(__mkl(__mkw(a,b),__mkw(c,d)))
16#define ROMSB_WORD0 __mk4('-','r','o','m')
17#define ROMSB_WORD1 __mk4('1','f','s','-')
18
19/* On-disk "super block" */
20
21struct romfs_super_block {
22 __be32 word0;
23 __be32 word1;
24 __be32 size;
25 __be32 checksum;
26 char name[0]; /* volume name */
27};
28
29/* On disk inode */
30
31struct romfs_inode {
32 __be32 next; /* low 4 bits see ROMFH_ */
33 __be32 spec;
34 __be32 size;
35 __be32 checksum;
36 char name[0];
37};
38
39#define ROMFH_TYPE 7
40#define ROMFH_HRD 0
41#define ROMFH_DIR 1
42#define ROMFH_REG 2
43#define ROMFH_SYM 3
44#define ROMFH_BLK 4
45#define ROMFH_CHR 5
46#define ROMFH_SCK 6
47#define ROMFH_FIF 7
48#define ROMFH_EXEC 8
49
50/* Alignment */
51
52#define ROMFH_SIZE 16
53#define ROMFH_PAD (ROMFH_SIZE-1)
54#define ROMFH_MASK (~ROMFH_PAD)
55
56#ifdef __KERNEL__
57
58/* Not much now */
59
60#endif /* __KERNEL__ */
61#endif