mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- 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:
parent
0e52616f5f
commit
c61f672499
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue