Fixed bug in partition table code where it incorrectly calculated the partition start...
authorBrian Palmer <brianp@sginet.com>
Thu, 14 Feb 2002 23:11:05 +0000 (23:11 +0000)
committerBrian Palmer <brianp@sginet.com>
Thu, 14 Feb 2002 23:11:05 +0000 (23:11 +0000)
svn path=/trunk/; revision=2624

freeldr/freeldr/fs/fat.c
freeldr/freeldr/fs/fs.c

index a4f9e26..ca09a7e 100644 (file)
@@ -47,6 +47,8 @@ BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector)
        ULONG   PhysicalHead;
        ULONG   PhysicalSector;
 
+       DbgPrint((DPRINT_FILESYSTEM, "FatOpenVolume() DriveNumber = 0x%x VolumeStartSector = %d\n", DriveNumber, VolumeStartSector));
+
        // Store the drive number
        FatDriveNumber = DriveNumber;
 
index 0e0861e..331cfb8 100644 (file)
@@ -161,7 +161,7 @@ BOOL OpenDiskDrive(ULONG DriveNumber, ULONG PartitionNumber)
        case PARTITION_FAT32:
        case PARTITION_FAT32_XINT13:
                FileSystemType = FS_FAT;
-               return FatOpenVolume(DriveNumber, PartitionTableEntry.StartSector);
+               return FatOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
        default:
                FileSystemType = 0;
                FileSystemError("Unsupported file system.");