} efs_extent;
typedef struct edevs {
- short odev;
- unsigned int ndev;
+ __be16 odev;
+ __be32 ndev;
} efs_devs;
/*
* is exactly 128 bytes long.
*/
struct efs_dinode {
- u_short di_mode; /* mode and type of file */
- short di_nlink; /* number of links to file */
- u_short di_uid; /* owner's user id */
- u_short di_gid; /* owner's group id */
- int32_t di_size; /* number of bytes in file */
- int32_t di_atime; /* time last accessed */
- int32_t di_mtime; /* time last modified */
- int32_t di_ctime; /* time created */
- uint32_t di_gen; /* generation number */
- short di_numextents; /* # of extents */
+ __be16 di_mode; /* mode and type of file */
+ __be16 di_nlink; /* number of links to file */
+ __be16 di_uid; /* owner's user id */
+ __be16 di_gid; /* owner's group id */
+ __be32 di_size; /* number of bytes in file */
+ __be32 di_atime; /* time last accessed */
+ __be32 di_mtime; /* time last modified */
+ __be32 di_ctime; /* time created */
+ __be32 di_gen; /* generation number */
+ __be16 di_numextents; /* # of extents */
u_char di_version; /* version of inode */
u_char di_spare; /* spare - used by AFS */
union di_addr {
/* efs superblock on disk */
struct efs_super {
- int32_t fs_size; /* size of filesystem, in sectors */
- int32_t fs_firstcg; /* bb offset to first cg */
- int32_t fs_cgfsize; /* size of cylinder group in bb's */
- short fs_cgisize; /* bb's of inodes per cylinder group */
- short fs_sectors; /* sectors per track */
- short fs_heads; /* heads per cylinder */
- short fs_ncg; /* # of cylinder groups in filesystem */
- short fs_dirty; /* fs needs to be fsck'd */
- int32_t fs_time; /* last super-block update */
- int32_t fs_magic; /* magic number */
+ __be32 fs_size; /* size of filesystem, in sectors */
+ __be32 fs_firstcg; /* bb offset to first cg */
+ __be32 fs_cgfsize; /* size of cylinder group in bb's */
+ __be16 fs_cgisize; /* bb's of inodes per cylinder group */
+ __be16 fs_sectors; /* sectors per track */
+ __be16 fs_heads; /* heads per cylinder */
+ __be16 fs_ncg; /* # of cylinder groups in filesystem */
+ __be16 fs_dirty; /* fs needs to be fsck'd */
+ __be32 fs_time; /* last super-block update */
+ __be32 fs_magic; /* magic number */
char fs_fname[6]; /* file system name */
char fs_fpack[6]; /* file system pack name */
- int32_t fs_bmsize; /* size of bitmap in bytes */
- int32_t fs_tfree; /* total free data blocks */
- int32_t fs_tinode; /* total free inodes */
- int32_t fs_bmblock; /* bitmap location. */
- int32_t fs_replsb; /* Location of replicated superblock. */
- int32_t fs_lastialloc; /* last allocated inode */
+ __be32 fs_bmsize; /* size of bitmap in bytes */
+ __be32 fs_tfree; /* total free data blocks */
+ __be32 fs_tinode; /* total free inodes */
+ __be32 fs_bmblock; /* bitmap location. */
+ __be32 fs_replsb; /* Location of replicated superblock. */
+ __be32 fs_lastialloc; /* last allocated inode */
char fs_spare[20]; /* space for expansion - MUST BE ZERO */
- int32_t fs_checksum; /* checksum of volume portion of fs */
+ __be32 fs_checksum; /* checksum of volume portion of fs */
};
/* efs superblock information in memory */
struct efs_sb_info {
- int32_t fs_magic; /* superblock magic number */
- int32_t fs_start; /* first block of filesystem */
- int32_t first_block; /* first data block in filesystem */
- int32_t total_blocks; /* total number of blocks in filesystem */
- int32_t group_size; /* # of blocks a group consists of */
- int32_t data_free; /* # of free data blocks */
- int32_t inode_free; /* # of free inodes */
- short inode_blocks; /* # of blocks used for inodes in every grp */
- short total_groups; /* # of groups */
+ __u32 fs_magic; /* superblock magic number */
+ __u32 fs_start; /* first block of filesystem */
+ __u32 first_block; /* first data block in filesystem */
+ __u32 total_blocks; /* total number of blocks in filesystem */
+ __u32 group_size; /* # of blocks a group consists of */
+ __u32 data_free; /* # of free data blocks */
+ __u32 inode_free; /* # of free inodes */
+ __u16 inode_blocks; /* # of blocks used for inodes in every grp */
+ __u16 total_groups; /* # of groups */
};
#endif /* __EFS_FS_SB_H__ */
struct volume_directory {
char vd_name[VDNAMESIZE]; /* name */
- int vd_lbn; /* logical block number */
- int vd_nbytes; /* file length in bytes */
+ __be32 vd_lbn; /* logical block number */
+ __be32 vd_nbytes; /* file length in bytes */
};
struct partition_table { /* one per logical partition */
- int pt_nblks; /* # of logical blks in partition */
- int pt_firstlbn; /* first lbn of partition */
- int pt_type; /* use of partition */
+ __be32 pt_nblks; /* # of logical blks in partition */
+ __be32 pt_firstlbn; /* first lbn of partition */
+ __be32 pt_type; /* use of partition */
};
struct volume_header {
- int vh_magic; /* identifies volume header */
- short vh_rootpt; /* root partition number */
- short vh_swappt; /* swap partition number */
+ __be32 vh_magic; /* identifies volume header */
+ __be16 vh_rootpt; /* root partition number */
+ __be16 vh_swappt; /* swap partition number */
char vh_bootfile[BFNAMESIZE]; /* name of file to boot */
char pad[48]; /* device param space */
struct volume_directory vh_vd[NVDIR]; /* other vol hdr contents */
struct partition_table vh_pt[NPARTAB]; /* device partition layout */
- int vh_csum; /* volume header checksum */
- int vh_fill; /* fill out to 512 bytes */
+ __be32 vh_csum; /* volume header checksum */
+ __be32 vh_fill; /* fill out to 512 bytes */
};
/* partition type sysv is used for EFS format CD-ROM partitions */