mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 07:39:22 +00:00
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:
1 parent
15643b71c0
commit
af4b2d89a0
2 files changed
+14
-3
No files matched your search
+7
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user