- We have to unpack the BIOS block before actually reading it.

- Now we correctly read 512 bytes per sector instead of 0.
- We are almost there!


svn path=/trunk/; revision=34665
This commit is contained in:
ReactOS Portable Systems Group 2008-07-22 07:12:05 +00:00
parent 0e52616f5f
commit c61f672499

View file

@ -412,6 +412,7 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension,
WCHAR LocalBuffer[16];
UNICODE_STRING SymbolicLinkName, DriveString, GuidString, DeviceName;
PPACKED_BOOT_SECTOR BootSector;
BIOS_PARAMETER_BLOCK BiosBlock;
ULONG BytesPerSector, SectorsPerTrack, Heads, BytesRead;
PVOID BaseAddress;
LARGE_INTEGER CurrentOffset;
@ -668,9 +669,10 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension,
// Get the data
//
BootSector = (PPACKED_BOOT_SECTOR)BaseAddress;
BytesPerSector = BootSector->PackedBpb.BytesPerSector[0];
SectorsPerTrack = BootSector->PackedBpb.SectorsPerTrack[0];
Heads = BootSector->PackedBpb.Heads[0];
FatUnpackBios(&BiosBlock, &BootSector->PackedBpb);
BytesPerSector = BiosBlock.BytesPerSector;
SectorsPerTrack = BiosBlock.SectorsPerTrack;
Heads = BiosBlock.Heads;
//
// Save it