summaryrefslogtreecommitdiffstats
path: root/src/fat.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/fat.c
parentff5f9f09896f07758222d8149a36628a1e7c3388 (diff)
IO redirection for alt. superblock/bs is enabled before file listing
Diffstat (limited to 'src/fat.c')
-rw-r--r--src/fat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fat.c b/src/fat.c
index 38a71c0..3f4908b 100644
--- a/src/fat.c
+++ b/src/fat.c
@@ -840,6 +840,9 @@ int recover_FAT(disk_t *disk_car, const struct fat_boot_sector*fat_header, parti
partition->part_size=(uint64_t)(sectors(fat_header)>0?sectors(fat_header):le32(fat_header->total_sect)) *
fat_sector_size(fat_header);
/* test_FAT has set partition->upart_type */
+ partition->sborg_offset=0;
+ partition->sb_size=512;
+ partition->sb_offset=0;
switch(partition->upart_type)
{
case UP_FAT12:
@@ -885,8 +888,8 @@ int recover_FAT(disk_t *disk_car, const struct fat_boot_sector*fat_header, parti
partition->part_type_gpt=GPT_ENT_TYPE_MS_BASIC_DATA;
if(backup)
{
- partition->boot_sector=6;
- partition->part_offset-=6*512; /* backup sector */
+ partition->sb_offset=6*512;
+ partition->part_offset-=partition->sb_offset; /* backup sector */
}
break;
default: