Author: ros-arm-bringup Date: Tue Jul 22 02:12:05 2008 New Revision: 34665
URL: http://svn.reactos.org/svn/reactos?rev=34665&view=rev Log: - 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!
Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c
Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramdi... ============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Tue Jul 22 02:12:05 2008 @@ -412,6 +412,7 @@ 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 @@ // 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