2006-01-03 Marco Gerards <marco@gnu.org>
* fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of the HFS+ filesystem to filesystem blocks. (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a GCC warning is silenced.
This commit is contained in:
parent
15643b71c0
commit
af4b2d89a0
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-01-03 Marco Gerards <marco@gnu.org>
|
||||
|
||||
* fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
|
||||
the HFS+ filesystem to filesystem blocks.
|
||||
(grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
|
||||
GCC warning is silenced.
|
||||
|
||||
2006-01-03 Marco Gerards <marco@gnu.org>
|
||||
|
||||
* partmap/apple.c (apple_partition_map_iterate): Convert the data
|
||||
|
|
10
fs/hfsplus.c
10
fs/hfsplus.c
|
@ -279,7 +279,8 @@ grub_hfsplus_read_block (grub_fshelp_node_t node, int fileblock)
|
|||
/* Try to find this block in the current set of extents. */
|
||||
blk = grub_hfsplus_find_block (extents, fileblock, &retry);
|
||||
if (blk != -1)
|
||||
return blk + node->data->embedded_offset;
|
||||
return blk + (node->data->embedded_offset >> (node->data->log2blksize
|
||||
- GRUB_DISK_SECTOR_BITS));
|
||||
|
||||
/* The previous iteration of this loop allocated memory. The
|
||||
code above used this memory, it can be free'ed now. */
|
||||
|
@ -704,8 +705,11 @@ grub_hfsplus_iterate_dir (grub_fshelp_node_t dir,
|
|||
|
||||
catkey = (struct grub_hfsplus_catkey *) record;
|
||||
|
||||
fileinfo = (record + grub_be_to_cpu16 (catkey->keylen)
|
||||
+ 2 + grub_be_to_cpu16(catkey->keylen) % 2);
|
||||
fileinfo =
|
||||
(struct grub_hfsplus_catfile *) ((char *) record
|
||||
+ grub_be_to_cpu16 (catkey->keylen)
|
||||
+ 2 + (grub_be_to_cpu16(catkey->keylen)
|
||||
% 2));
|
||||
|
||||
/* Stop iterating when the last directory entry was found. */
|
||||
if (grub_be_to_cpu32 (catkey->parent) != dir->fileid)
|
||||
|
|
Loading…
Reference in a new issue