summaryrefslogtreecommitdiffstats
path: root/src/ntfs_adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-07-18 22:16:08 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-07-18 22:16:08 +0200
commit8585ef8e51b492783c7d4a3125beeacac1d4314a (patch)
treeec8cbc98265f903e2ca2063b78f93eb3c358ad23 /src/ntfs_adv.c
parentcc3bc11be8d37123b2165510fe510c8ca5944385 (diff)
Store disk geometry in cylinders/heads_per_cylinder/sectors_per_head instead of CHS
Diffstat (limited to 'src/ntfs_adv.c')
-rw-r--r--src/ntfs_adv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ntfs_adv.c b/src/ntfs_adv.c
index 9ad80d4..31d9118 100644
--- a/src/ntfs_adv.c
+++ b/src/ntfs_adv.c
@@ -296,8 +296,8 @@ static int create_ntfs_boot_sector(disk_t *disk_car, partition_t *partition, con
ntfs_header->sectors[1]=0;
ntfs_header->media=0xF8;
ntfs_header->fat_length=le16(0);
- ntfs_header->secs_track=le16(disk_car->CHS.sector);
- ntfs_header->heads=le16(disk_car->CHS.head+1);
+ ntfs_header->secs_track=le16(disk_car->geom.sectors_per_head);
+ ntfs_header->heads=le16(disk_car->geom.heads_per_cylinder);
/* absolute sector address from the beginning of the disk (!= FAT) */
ntfs_header->hidden=le32(partition->part_offset/disk_car->sector_size);
ntfs_header->total_sect=le32(0);