summaryrefslogtreecommitdiffstats
path: root/src/hfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2007-11-13 23:35:47 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2007-11-13 23:35:47 +0100
commit455ed826c8a213979aaa69b3af09181ce2b4706c (patch)
tree4338c17dc162d89c33f67251734af7a30eb6412d /src/hfs.c
parentff5f9f09896f07758222d8149a36628a1e7c3388 (diff)
IO redirection for alt. superblock/bs is enabled before file listing
Diffstat (limited to 'src/hfs.c')
-rw-r--r--src/hfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hfs.c b/src/hfs.c
index 40d0d09..30f30fa 100644
--- a/src/hfs.c
+++ b/src/hfs.c
@@ -62,11 +62,13 @@ int recover_HFS(disk_t *disk_car, const hfs_mdb_t *hfs_mdb,partition_t *partitio
return 1;
/* The extra 0x400 bytes are for the backup MDB */
part_size=(uint64_t)be16(hfs_mdb->drNmAlBlks)*be32(hfs_mdb->drAlBlkSiz)+be16(hfs_mdb->drAlBlSt)*512+0x400;
+ partition->sborg_offset=0x400;
+ partition->sb_size=HFS_SUPERBLOCK_SIZE;
if(backup>0)
{
if(partition->part_offset+2*disk_car->sector_size<part_size)
return 1;
- partition->boot_sector=(part_size-0x400)/disk_car->sector_size;
+ partition->sb_offset=part_size-0x400;
partition->part_offset=partition->part_offset+2*disk_car->sector_size-part_size;
}
partition->part_size=part_size;