2008-06-29 Robert Millan <rmh@aybabtu.com>

* fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
        block to disk block.
        (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
        Patch from Niels B\303\266hm <bitbucket@arcor.de>
This commit is contained in:
robertmh 2008-06-29 21:33:38 +00:00
parent 674835c830
commit 5444088da6
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-06-29 Robert Millan <rmh@aybabtu.com>
* fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
block to disk block.
(grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
Patch from Niels Böhm <bitbucket@arcor.de>
2008-06-29 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (font_path): Search for fonts in

View file

@ -163,6 +163,10 @@ static grub_dl_t my_mod;
#define GRUB_XFS_INO_AG(data,ino) \
(grub_be_to_cpu64 (ino) >> GRUB_XFS_INO_AGBITS (data))
#define GRUB_XFS_FSB_TO_BLOCK(data, fsb) \
(((fsb) >> (data)->sblock.log2_agblk) * (data)->agsize \
+ ((fsb) & ((1 << (data)->sblock.log2_agblk) - 1)))
#define GRUB_XFS_EXTENT_OFFSET(exts,ex) \
((grub_be_to_cpu32 (exts[ex][0]) & ~(1 << 31)) << 23 \
| grub_be_to_cpu32 (exts[ex][1]) >> 9)
@ -310,7 +314,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
if (leaf)
grub_free (leaf);
return ret;
return GRUB_XFS_FSB_TO_BLOCK(node->data, ret);
}