2009-08-26 Bean <bean123ch@gmail.com>

* fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
	64-bit number.
	(GRUB_XFS_FSB_TO_BLOCK): Likewise.
	(grub_xfs_inode_block): Change return type to grub_uint64_t.
	(grub_xfs_read_inode): Change type of block to grub_uint64_t.
This commit is contained in:
bean 2009-08-26 14:17:34 +00:00
parent 552bf6c568
commit 32a716555d
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2009-08-26 Bean <bean123ch@gmail.com>
* fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
64-bit number.
(GRUB_XFS_FSB_TO_BLOCK): Likewise.
(grub_xfs_inode_block): Change return type to grub_uint64_t.
(grub_xfs_read_inode): Change type of block to grub_uint64_t.
2009-08-25 Vladimir Serbinenko <phcoder@gmail.com> 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
NetBSD memory map support. NetBSD memory map support.

View file

@ -160,13 +160,13 @@ static grub_dl_t my_mod;
#define GRUB_XFS_INO_AGBITS(data) \ #define GRUB_XFS_INO_AGBITS(data) \
((data)->sblock.log2_agblk + (data)->sblock.log2_inop) ((data)->sblock.log2_agblk + (data)->sblock.log2_inop)
#define GRUB_XFS_INO_INOINAG(data, ino) \ #define GRUB_XFS_INO_INOINAG(data, ino) \
(grub_be_to_cpu64 (ino) & ((1 << GRUB_XFS_INO_AGBITS (data)) - 1)) (grub_be_to_cpu64 (ino) & ((1LL << GRUB_XFS_INO_AGBITS (data)) - 1))
#define GRUB_XFS_INO_AG(data,ino) \ #define GRUB_XFS_INO_AG(data,ino) \
(grub_be_to_cpu64 (ino) >> GRUB_XFS_INO_AGBITS (data)) (grub_be_to_cpu64 (ino) >> GRUB_XFS_INO_AGBITS (data))
#define GRUB_XFS_FSB_TO_BLOCK(data, fsb) \ #define GRUB_XFS_FSB_TO_BLOCK(data, fsb) \
(((fsb) >> (data)->sblock.log2_agblk) * (data)->agsize \ (((fsb) >> (data)->sblock.log2_agblk) * (data)->agsize \
+ ((fsb) & ((1 << (data)->sblock.log2_agblk) - 1))) + ((fsb) & ((1LL << (data)->sblock.log2_agblk) - 1)))
#define GRUB_XFS_EXTENT_OFFSET(exts,ex) \ #define GRUB_XFS_EXTENT_OFFSET(exts,ex) \
((grub_be_to_cpu32 (exts[ex][0]) & ~(1 << 31)) << 23 \ ((grub_be_to_cpu32 (exts[ex][0]) & ~(1 << 31)) << 23 \
@ -185,7 +185,7 @@ static grub_dl_t my_mod;
#define GRUB_XFS_NEXT_DIRENT(pos,len) \ #define GRUB_XFS_NEXT_DIRENT(pos,len) \
(pos) + GRUB_XFS_ROUND_TO_DIRENT (8 + 1 + len + 2) (pos) + GRUB_XFS_ROUND_TO_DIRENT (8 + 1 + len + 2)
static inline int static inline grub_uint64_t
grub_xfs_inode_block (struct grub_xfs_data *data, grub_xfs_inode_block (struct grub_xfs_data *data,
grub_uint64_t ino) grub_uint64_t ino)
{ {
@ -213,7 +213,7 @@ static grub_err_t
grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino, grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
struct grub_xfs_inode *inode) struct grub_xfs_inode *inode)
{ {
int block = grub_xfs_inode_block (data, ino); grub_uint64_t block = grub_xfs_inode_block (data, ino);
int offset = grub_xfs_inode_offset (data, ino); int offset = grub_xfs_inode_offset (data, ino);
/* Read the inode. */ /* Read the inode. */