diff options
author | Mike Shaver <shaver@ingenia.com> | 1999-03-25 17:14:33 +0000 |
---|---|---|
committer | Mike Shaver <shaver@ingenia.com> | 1999-03-25 17:14:33 +0000 |
commit | ae9d38e9ea2cb7f28e757975537dabe5fb2f145d (patch) | |
tree | 19d200885708b6a2449f7465f19f3828a1e243f7 /include/linux/efs_dir.h | |
parent | c01138a72c1ed121902fc3c1dda854239d506368 (diff) |
new EFS headers (Al Smith rocks my world)
Diffstat (limited to 'include/linux/efs_dir.h')
-rw-r--r-- | include/linux/efs_dir.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/efs_dir.h b/include/linux/efs_dir.h new file mode 100644 index 000000000..3459bd4bf --- /dev/null +++ b/include/linux/efs_dir.h @@ -0,0 +1,41 @@ +/* + * efs_dir.h + * + * Copyright (c) 1999 Al Smith + */ + +#ifndef __EFS_DIR_H__ +#define __EFS_DIR_H__ + +#define EFS_DIRBSIZE EFS_BLOCKSIZE + +struct efs_dentry { + unsigned int inode; + unsigned char namelen; + char name[3]; +}; + +#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1) +#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1) + +#define EFS_DIRBLK_HEADERSIZE 4 +#define EFS_DIRBLK_MAGIC 0xbeef /* moo */ + +struct efs_dir { + unsigned short magic; + unsigned char firstused; + unsigned char slots; + + unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE]; +}; + +#define EFS_MAXENTS \ + ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / \ + (EFS_DENTSIZE + sizeof(char))) + +#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot]) + +#define EFS_REALOFF(offset) ((offset << 1)) + +#endif /* __EFS_DIR_H__ */ + |