2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 19:53:59 +08:00
linux-next/include/linux/efs_dir.h
Linus Torvalds 1da177e4c3 Linux-2.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!
2005-04-16 15:20:36 -07:00

43 lines
844 B
C

/*
* efs_dir.h
*
* Copyright (c) 1999 Al Smith
*/
#ifndef __EFS_DIR_H__
#define __EFS_DIR_H__
#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
struct efs_dentry {
__be32 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 {
__be16 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__ */