aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/efs_dir.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/efs_dir.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/efs_dir.h')
-rw-r--r--include/linux/efs_dir.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/efs_dir.h b/include/linux/efs_dir.h
new file mode 100644
index 000000000000..a09ec010569c
--- /dev/null
+++ b/include/linux/efs_dir.h
@@ -0,0 +1,42 @@
1/*
2 * efs_dir.h
3 *
4 * Copyright (c) 1999 Al Smith
5 */
6
7#ifndef __EFS_DIR_H__
8#define __EFS_DIR_H__
9
10#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
11#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
12
13struct efs_dentry {
14 __be32 inode;
15 unsigned char namelen;
16 char name[3];
17};
18
19#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1)
20#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1)
21
22#define EFS_DIRBLK_HEADERSIZE 4
23#define EFS_DIRBLK_MAGIC 0xbeef /* moo */
24
25struct efs_dir {
26 __be16 magic;
27 unsigned char firstused;
28 unsigned char slots;
29
30 unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE];
31};
32
33#define EFS_MAXENTS \
34 ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / \
35 (EFS_DENTSIZE + sizeof(char)))
36
37#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot])
38
39#define EFS_REALOFF(offset) ((offset << 1))
40
41#endif /* __EFS_DIR_H__ */
42