1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12#ifndef __EFS_DIR_H__ 13#define __EFS_DIR_H__ 14 15#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS 16#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS) 17 18struct efs_dentry { 19 __be32 inode; 20 unsigned char namelen; 21 char name[3]; 22}; 23 24#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1) 25#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1) 26 27#define EFS_DIRBLK_HEADERSIZE 4 28#define EFS_DIRBLK_MAGIC 0xbeef 29 30struct efs_dir { 31 __be16 magic; 32 unsigned char firstused; 33 unsigned char slots; 34 35 unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE]; 36}; 37 38#define EFS_MAXENTS ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / (EFS_DENTSIZE + sizeof(char))) 39 40#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot]) 41 42#define EFS_REALOFF(offset) ((offset << 1)) 43 44#endif 45 46