Don't use e2fs_inode_size in superblock on E2FS_REV0 file system.

This commit is contained in:
tsutsui 2009-03-02 09:54:49 +00:00
parent a14b6c39ff
commit d0939ef481
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_dinode.h,v 1.18 2009/03/01 15:59:57 christos Exp $ */ /* $NetBSD: ext2fs_dinode.h,v 1.19 2009/03/02 09:54:49 tsutsui Exp $ */
/* /*
* Copyright (c) 1982, 1989, 1993 * Copyright (c) 1982, 1989, 1993
@ -154,7 +154,10 @@ struct ext2fs_dinode {
#define EXT2_NODUMP 0x00000040 /* do not dump file */ #define EXT2_NODUMP 0x00000040 /* do not dump file */
/* Size of on-disk inode. */ /* Size of on-disk inode. */
#define EXT2_DINODE_SIZE(s) (s)->e2fs.e2fs_inode_size #define EXT2_REV0_DINODE_SIZE sizeof(struct ext2fs_dinode)
#define EXT2_DINODE_SIZE(fs) ((fs)->e2fs.e2fs_rev > E2FS_REV0 ? \
(fs)->e2fs.e2fs_inode_size : \
EXT2_REV0_DINODE_SIZE)
/* /*
* The e2di_blocks fields may be overlaid with other information for * The e2di_blocks fields may be overlaid with other information for