diff options
Diffstat (limited to 'sys/gnu/fs/ext2fs/ext2_fs.h')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_fs.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_fs.h b/sys/gnu/fs/ext2fs/ext2_fs.h index ce45bbd..fc54119 100644 --- a/sys/gnu/fs/ext2fs/ext2_fs.h +++ b/sys/gnu/fs/ext2fs/ext2_fs.h @@ -3,6 +3,8 @@ * * Aug 1995, Godmar Back (gback@cs.utah.edu) * University of Utah, Department of Computer Science + * + * $FreeBSD$ */ /* * linux/include/linux/ext2_fs.h @@ -227,6 +229,71 @@ struct ext2_group_desc #define EXT2_IOC_SETVERSION _IOW('v', 2, long) /* + * Only declare `struct ext2_inode' if <ufs/ufs/inode.h> hasn't made things + * difficult by #defining i_mode and other struct members. The details of + * the struct are only needed in ext2_inode_cnv.c where the ext2fs on-disk + * inode is converted to a ufs in-core inode. + */ +#ifndef i_mode + +/* + * Structure of an inode on the disk + */ +struct ext2_inode { + __u16 i_mode; /* File mode */ + __u16 i_uid; /* Owner Uid */ + __u32 i_size; /* Size in bytes */ + __u32 i_atime; /* Access time */ + __u32 i_ctime; /* Creation time */ + __u32 i_mtime; /* Modification time */ + __u32 i_dtime; /* Deletion Time */ + __u16 i_gid; /* Group Id */ + __u16 i_links_count; /* Links count */ + __u32 i_blocks; /* Blocks count */ + __u32 i_flags; /* File flags */ + union { + struct { + __u32 l_i_reserved1; + } linux1; + struct { + __u32 h_i_translator; + } hurd1; + struct { + __u32 m_i_reserved1; + } masix1; + } osd1; /* OS dependent 1 */ + __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */ + __u32 i_version; /* File version (for NFS) */ + __u32 i_file_acl; /* File ACL */ + __u32 i_dir_acl; /* Directory ACL */ + __u32 i_faddr; /* Fragment address */ + union { + struct { + __u8 l_i_frag; /* Fragment number */ + __u8 l_i_fsize; /* Fragment size */ + __u16 i_pad1; + __u32 l_i_reserved2[2]; + } linux2; + struct { + __u8 h_i_frag; /* Fragment number */ + __u8 h_i_fsize; /* Fragment size */ + __u16 h_i_mode_high; + __u16 h_i_uid_high; + __u16 h_i_gid_high; + __u32 h_i_author; + } hurd2; + struct { + __u8 m_i_frag; /* Fragment number */ + __u8 m_i_fsize; /* Fragment size */ + __u16 m_pad1; + __u32 m_i_reserved2[2]; + } masix2; + } osd2; /* OS dependent 2 */ +}; + +#endif /* i_mode */ + +/* * File system states */ #define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */ |