summaryrefslogtreecommitdiffstats
path: root/src/fat_adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-07-15 07:19:13 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-07-15 07:19:13 +0200
commitf69c61a5daf3e9e80dd6dce0bcd2a46dc4c43518 (patch)
tree3d074ccf2e83483f6bc88dd9f77dc795ce4806a9 /src/fat_adv.c
parent39f40e9312ae7c70033df390d7fd90e6fc912260 (diff)
Allow booting from FAT logical partition by setting FAT hidden field in the same way than for primary partition.
Diffstat (limited to 'src/fat_adv.c')
-rw-r--r--src/fat_adv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fat_adv.c b/src/fat_adv.c
index 69c6ebf..b6cf8db 100644
--- a/src/fat_adv.c
+++ b/src/fat_adv.c
@@ -1113,9 +1113,11 @@ static void create_fat_boot_sector(disk_t *disk_car, partition_t *partition, con
memcmp(fat_header->system_id,"MSWIN4.1",8))
memcpy(fat_header->system_id,"MSWIN4.1",8);
/* FIXME, need to know where the extended or logical partition start */
+#if 0
if(partition->status==STATUS_LOG)
fat_header->hidden=le32(disk_car->geom.sectors_per_head);
else
+#endif
fat_header->hidden=le32((partition->part_offset/disk_car->sector_size));
fat_header->sectors_per_cluster=sectors_per_cluster;
fat_header->reserved=le16(reserved);