NTSTATUS Status;
PFAT_BOOTSECTOR OrigBootSector;
PFAT_BOOTSECTOR NewBootSector;
- PARTITION_INFORMATION *PartInfo;
/* Allocate buffer for original bootsector */
OrigBootSector = RtlAllocateHeap(ProcessHeap, 0, SECTORSIZE);
FIELD_OFFSET(FAT_BOOTSECTOR, BootCodeAndData) -
FIELD_OFFSET(FAT_BOOTSECTOR, OemName));
- PartInfo = &PartitionList->CurrentPartition->PartInfo[PartitionList->CurrentPartitionNumber];
- NewBootSector->HiddenSectors = PartInfo->HiddenSectors;
+ NewBootSector->HiddenSectors = PartitionList->CurrentDisk->SectorsPerTrack;
/* Free the original boot sector */
RtlFreeHeap(ProcessHeap, 0, OrigBootSector);
PFAT32_BOOTSECTOR NewBootSector;
LARGE_INTEGER FileOffset;
USHORT BackupBootSector;
- PARTITION_INFORMATION *PartInfo;
/* Allocate buffer for original bootsector */
OrigBootSector = RtlAllocateHeap(ProcessHeap, 0, SECTORSIZE);
FIELD_OFFSET(FAT32_BOOTSECTOR, BootCodeAndData) -
FIELD_OFFSET(FAT32_BOOTSECTOR, OemName));
- PartInfo = &PartitionList->CurrentPartition->PartInfo[PartitionList->CurrentPartitionNumber];
- NewBootSector->HiddenSectors = PartInfo->HiddenSectors;
+ NewBootSector->HiddenSectors = PartitionList->CurrentDisk->SectorsPerTrack;
/* Get the location of the backup boot sector */
BackupBootSector = OrigBootSector->BackupBootSector;