diff options
author | pfg <pfg@FreeBSD.org> | 2013-01-22 18:54:03 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-01-22 18:54:03 +0000 |
commit | 646ebf1c313f6d3dc7bcbf6c0e440f29eba45549 (patch) | |
tree | 322db2ef8acab2121389fe52d9299a78e91a9707 /sys/fs/ext2fs/inode.h | |
parent | 611d98380eb5b904ae2f05382e59e0909b5f45f3 (diff) | |
download | FreeBSD-src-646ebf1c313f6d3dc7bcbf6c0e440f29eba45549.zip FreeBSD-src-646ebf1c313f6d3dc7bcbf6c0e440f29eba45549.tar.gz |
ext2fs: make some inode fields match the ext2 spec.
Ext2fs uses unsigned fields in its dinode struct.
FreeBSD can have negative values in some of those
fields and the inode is meant to interact with the
system so we have never respected the unsigned
nature of most of those fields.
Block numbers and the NFS generation number do
not need to be signed so redefine them as
unsigned to better match the on-disk information.
MFC after: 1 week
Diffstat (limited to 'sys/fs/ext2fs/inode.h')
-rw-r--r-- | sys/fs/ext2fs/inode.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index d8aaac9..ec47216 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -90,11 +90,11 @@ struct inode { int32_t i_atimensec; /* Last access time. */ int32_t i_ctimensec; /* Last inode change time. */ int32_t i_birthnsec; /* Inode creation time. */ - int32_t i_db[NDADDR]; /* Direct disk blocks. */ - int32_t i_ib[NIADDR]; /* Indirect disk blocks. */ + uint32_t i_db[NDADDR]; /* Direct disk blocks. */ + uint32_t i_ib[NIADDR]; /* Indirect disk blocks. */ uint32_t i_flags; /* Status flags (chflags). */ - int32_t i_blocks; /* Blocks actually held. */ - int32_t i_gen; /* Generation number. */ + uint32_t i_blocks; /* Blocks actually held. */ + uint32_t i_gen; /* Generation number. */ uint32_t i_uid; /* File owner. */ uint32_t i_gid; /* File group. */ }; @@ -162,7 +162,7 @@ struct ufid { uint16_t ufid_len; /* Length of structure. */ uint16_t ufid_pad; /* Force 32-bit alignment. */ ino_t ufid_ino; /* File number (ino). */ - int32_t ufid_gen; /* Generation number. */ + uint32_t ufid_gen; /* Generation number. */ }; #endif /* _KERNEL */ |